Instancing the 4-Bit Counter
You know the drill:
device Counter is
attr refPrefix = "U";
attr pkg_type = "16-TSSOP";
pin B = {1};
pin Qb = {2};
pin Qa = {3};
pin Down = {4};
pin Up = {5};
pin Qc = {6};
pin Qd = {7};
pin gnd = {8};
pin D = {9};
pin C = {10};
pin _Load = {11};
pin _Co = {12};
pin _Bo = {13};
pin clr = {14};
pin A = {15};
pin vcc = {16};
end device Counter;
|
Next comes the device instance:
inst cntr of Counter is
B = GND;
Qb = AND_in[2];
Qa = AND_in[4];
Down = +5V;
Up = 555_junct;
Qc = AND_in[3];
Qd = +5V;
gnd = GND;
D = GND;
C = GND;
_Load = CR_junct;
_Co = open;
_Bo = open;
clr = GND;
A = open;
vcc = +5V;
end inst cntr;
|
Hope you're not dizzy yet, because the hardest stuff is coming up soon. Stay tuned for more PHDL action on the same PHDL channel.