contents.gifindex.gif

Mixed Pin-to-pin and Detailed Example

In this example, pin-to-pin and detailed descriptions are combined: the reset function is described using detailed design methods, and the rest of the circuit is described pin-to-pin.

module count
q0,q1 pin istype 'reg,buffer';
clock pin;
reset pin;
equations
[q1,q0].clk = clock;
[q1,q0] := [q1.FB,q0.FB] + 1;
[q1.SR,q0.SR] = reset;
test vectors ([clock,reset]->[q1,q0])
[ .c. , 1 ]->[ 0, 0];
:
end


Note: When you describe a preset or reset function with a detailed description, you need to include an 'invert' or 'buffer' attribute. If you specify 'invert', the preset logic is reversed (and acts as a reset when observed from the pin).