Multichannel Design
Guide to creating multichannel designs in SCI-Compiler using sub-designs with array and common ports to implement identical functionality across multiple channels efficiently.
Overview
SciCompiler is a tool designed to speed-up the development of small-medium and large scientific experiments. Usually more than one channel is used and the functionalities of different channels are identical.
Sub design helps to avoid unnecessary copy and paste. It is possible to implement a single channel processing logic in a sub sheet and then replicate the component several times in the top design.
This is not the best practice to implement a multichannel design. In SciCompiler exists a specific sub design entry for multichannel design.
Example: Polarity Inversion Block
Consider the following application: we want to change the polarity of input signals using a common register.
Step 1: Create the Sub-Design
First, implement the configurable polarity inversion block for a single channel in a sub-design.
Step 2: Implement the Logic
In the sub design sheet, place the correct blocks:
- Subtraction with respect to 0x3FFF to implement the inversion
- A mux to select if using positive (1) or negative (0) polarity
Step 3: Create Schematic Ports
As you can see in the diagram above, we also create schematic entries (Input/Output ports):
- S_IN: Signal input is the 16 bit signal input port. In a multichannel design this port must be replicated, one per channel
- S_OUT: Signal output is the 16 bit signal output port. In a multichannel design this port must be replicated, one per channel
- SEL_POL: Is a 1 bit input to select between positive (1) and negative/inverted (0) polarity. This port should be common for all channels
Creating Schematic Ports
To create a port, right click on the diagram and select MISC → Schematic Port.
Port Multichannel Behavior
When placing an input port, the tool asks if you want to create a port for each channel or a common port for all channels.
This option is available only for input ports. Output ports will always be one for each channel in order to avoid bus contentions.
To create the port as one port for each channel, select ARRAY in multichannel behavior.
ARRAY Port (Replicated per Channel)
For S_IN PORT we will select multichannel behavior to ARRAY:
The symbol created will have the multi-square icon to indicate that this port will be replicated in a multichannel design:
COMMON Port (Shared by All Channels)
For SEL_POL we will create the port as COMMON to provide the same value to all sub-design channels:
Compiling the Sub-Design
Remember to compile the page before using it in a top design:
Creating Multichannel Sub-Design in Top Design
Step 1: Insert Multichannel Sub-Design
In the top design, create a multichannel sub design: Right Click → sub-design → Multi channels sub design
Step 2: Configure Replication
Sci-Compiler prompts to select a sub-design and choose the number of times to replicate it:
Step 3: Multichannel Block Created
The multichannel block is created in the top file:
Each channel has an input and an output, and all share the SEL_POL input:
Port Types Summary
ARRAY Ports
- Behavior: One port instance per channel
- Use for: Signals that differ per channel (inputs, outputs)
- Icon: Multi-square symbol
- Example: Individual signal inputs/outputs
COMMON Ports
- Behavior: Single port shared by all channels
- Use for: Configuration parameters, control signals
- Icon: Standard port symbol
- Example: Mode selection, enable signals
Output Ports
- Always ARRAY: Prevents bus contention
- Cannot be COMMON: Each channel must have separate output
Related Documentation
- Hierarchical Design - Organizing complex designs
- Tree Menu - Managing sub-designs in the project tree
- IDE User Interface - IDE overview