Professional Documents
Culture Documents
The inputs and outputs to ABEL-HDL modules are always called pins,
even when the module is not at the top level of the hierarchy. Synario
always treats ABEL-HDL PINs as connections to the world outside the
module, and NODEs as signals internal to the module. When
connected to a higher level schematic, the ABEL-HDL PINs connect to
the schematic through the pins on the associated block symbol. This is
illustrated in Figure 1 which shows a block symbol for the ABEL-HDL
module Example1. In this figure, the pins on the symbol connect to
wires in the schematic. The pins on the symbol also connect to the
signals that are declared as PINs in the lower-level ABEL-HDL module.
The next section, ABEL-HDL Structure, gives a brief description of the
structure of ABEL-HDL modules. For more information, refer to the
ABEL-HDL Reference Manual.
ABEL-HDL Structure
An ABEL-HDL module consists of a MODULE statement, signal
declarations, equations, an optional test vectors section, and an END
statement. See the ABEL-HDL Reference for more information on
creating ABEL-HDL sources. The module Example1 shows the
structure of a small ABEL-HDL module.
MODULE Example1
in1, in2, in3, in4 PIN;
out1, out2, out3, out4 PIN ISTYPE ‘reg_d, buffer’;
EQUATIONS
out1.D = in1 & in2;
out2.D = in3 & in4;
out3.D = in4 & in1;
out4.D = in4 & in2 # in3 & in1;
END
The MODULE keyword defines the module name of the ABEL module.
When you create a block symbol for an ABEL-HDL module in a higher
level schematic, the symbol name must match the ABEL-HDL module
name. This is how Synario identifies where to connect the lower-level
ABEL-HDL module.
2
Howto: ABEL-HDL Custom Symbol Library
Edit Symbol
After you have created a block symbol for an ABEL-HDL module and
placed it in the schematic, you can edit it to make it look more like the
circuit element it represents. To edit a symbol you can either click on
the Edit button in the New Block Symbol editor, or you can select
Symbol from the Edit menu, and then select the symbol that you wish
to edit.
3
Howto: ABEL-HDL Custom Symbol Library
data = [data3..data0];
the set is flattened during compiling and the brackets are removed. In
this example, during compiling every instance of the set data is
replaced by the individual signals, data3, data2, data1, and data0.
data[3:0];
When a schematic bus (or symbol bus pin) is compiled, the elements
of the bus remain in the bus and the brackets are not removed. In this
example, the individual elements of data[3:0] are data[3], data[2],
data[1], data[0]. You can see that if the elements of the symbol pin
data[3:0] and the elements of the ABEL-HDL set [data3..data0] do not
match. This will cause linking errors.
For example, the following ABEL-HDL module has four output pins that
are grouped into the set outset. To connect a schematic bus to this
ABEL-HDL module, create a symbol that has a comma delineated bus
for the symbol output pin name, using the names of the ABEL-HDL
output pins.
MODULE Example2
in1, in2 PIN;
out1, out2, out3, out4 PIN ISTYPE ‘reg_d, buffer’;
outset = [out1..out4];
EQUATIONS
out1.D = in1 & in2;
out2.D = in3 & in4;
out3.D = in4 & in1;
out4.D = in4 & in2 # in3 & in1;
END
4
Howto: ABEL-HDL Custom Symbol Library
Figure 3 shows the New Block Symbol entries used to create a symbol
for this ABEL-HDL module. Note that the signals that are to be
grouped in a bus are surrounded by ‘=’. Figure 4 shows a correctly
created symbol. Figure 5 shows an incorrectly created symbol using
the ABEL-HDL set name instead of the output pin names. For more
information on creating and editing symbols, see the Schematic Entry
User Manual.
EXAMPLE2
in1
out1,out2,out3,out4
in2
I_11
5
Howto: ABEL-HDL Custom Symbol Library
EXAMPLE2
in1
outset
in2
I_11
You can, however, hide bus pin names and replace them with text. To
hide the bus name:
2. In the Symbol editor select Pin Name Location from the Add
menu.
4. Select Text from the Add menu and type in a new name for
the pin. Click on the location where you want to add the
text.
5. Resize the symbol (if necessary) using the Drag and Move
options from the Edit menu.
6
Howto: ABEL-HDL Custom Symbol Library
<Synario>\generic\generic\misc
You can also copy the ABEL-HDL file to a central location where you
can easily import into a project. There is no restriction to where you
can store ABEL-HDL files, as long as you remember where they are.
To add an ABEL-HDL source to your project, open the Source menu in
the Project Navigator and select Import. Navigate to the directory
where your ABEL-HDL files are stored and select the desired ABEL-HDL
file to add it to your source. The file will automatically be copied to
your local project directory for processing in Synario.
7
Howto: ABEL-HDL Custom Symbol Library
A Simple Example
In this example, we will create a small ABEL-HDL module that has a D
register with an Asynchronous reset and an Asynchronous preset. The
current generic symbol library does not have a symbol like this (with a
reset and preset), so this will be a useful addition to the library. The
ABEL-HDL module is shown below:
MODULE DFFPC
8
Howto: ABEL-HDL Custom Symbol Library
DFFPC
D
P
Q
C
CLK
I_14
Once we have created the symbol, we can edit it to look more like a D
flip-flop. Figure 8 illustrates how the edited symbol might look. For
this example, I rearranged the symbol pins, hid the pin name of the
CLK input and replaced it with a graphics, and moved the InstName
and Type attributes to different locations.
9
Howto: ABEL-HDL Custom Symbol Library
P
D
Q
DFFPC
C
I_13
To make this symbol available to all projects, simply copy it to the
<Synario>\generic\generic\misc directory. It will now show up in the
Generic\Misc library in the Schematic Editor when you select Symbol
from the Add menu. Copy the file that contains ABEL-HDL module to a
centralized directory as well so you can add it to future projects. To
add it to a project, use Import from the Project Navigator Source
menu, navigate to the directory where the file is located and import it.
10
Howto: ABEL-HDL Custom Symbol Library
The equations consist of clock and reset equations for the counter bits
using dot extensions, and counter logic which consists of four product
terms. The first product term tells the counter to decrement while
HOLD and LOAD are not active and the counter has not reached 0.
The second product terms tells the counter to hold its current value if
HOLD is active. The third product term loads the counter to the value
of the DATA bits when LOAD is active. The fourth product term rolls
the counter back to the value on the DATA lines when it reaches 0.
Again, once the ABEL-HDL module has been created, we need to create
a symbol for it. From the Schematic Editor, select New Block Symbol
from the Add menu. Enter the ABEL-HDL module name as the Block
Name and the input and output pins, as shown in Figure 9. Note that
in Figure 9, there was not enough room to show all of the inputs. The
important thing to notice here is that the bus pins are defined using
the =sig1,sig2,sig3…= notation. Figure 10 shows the resulting block
symbol.
11
Howto: ABEL-HDL Custom Symbol Library
CNT4DLHR
CLK
LOAD
HOLD
Q3,Q2,Q1,Q0
RESET
DATA3,DATA2,DATA1,DATA0
Now you can edit the symbol to hide the bus pin names and to re-scale
it. Figure 11 illustrates how the edited symbol might look. For this
example, I hid the comma delineated bus names and replaced them
with text that looks like schematic iterated bus names. I also re-scaled
the symbol so that it doesn’t take up as much room on the schematic.
12
Howto: ABEL-HDL Custom Symbol Library
CNT4DLHR
LOAD
HOLD
RESET
Q[3:0]
CLK
DATA[3:0]
DATA
Concluding Remarks
Using generic ABEL-HDL modules in Synario is an easy way to develop
re-usable modules that are tailored for the types of designs you create
and the kind of devices you target. You can create modules to
describe very simple circuit elements such as flip-flops or large AND
gates. You can also create complex modules of counters and other
functions that can be quickly re-used. Taking advantage of ABEL-HDL
higher order operators can save design time and simplify the design
process.
13
Howto: ABEL-HDL Custom Symbol Library
14