Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- INCLUDE "lpm_counter.inc";
- SUBDESIGN Lab
- (
- clock : INPUT;
- -- a[10..0] : OUTPUT;
- A : OUTPUT;
- )
- VARIABLE
- wire_cnt[4..0]:Node;
- cnt [10..0]:node;
- q[10..0]:node;
- lpm_counter_component : lpm_counter WITH (
- LPM_DIRECTION = "UP",
- LPM_PORT_UPDOWN = "PORT_UNUSED",
- LPM_TYPE = "LPM_COUNTER",
- LPM_WIDTH = 11
- );
- Begin
- q[10..0] = lpm_counter_component.q[10..0];
- lpm_counter_component.clock = clock;
- wire_cnt=q[10..6];
- wire_cnt[4..0]=q[10..6];
- A=(wire_cnt[4..0]==0)OR(wire_cnt[4..0]==2)OR(wire_cnt[4..0]==4)OR
- (wire_cnt[4..0]==8)OR(wire_cnt[4..0]==9)OR(wire_cnt[4..0]==10)OR(wire_cnt[4..0]==12)OR(wire_cnt[4..0]==13)OR
- (wire_cnt[4..0]==14)OR(wire_cnt[4..0]==16)OR(wire_cnt[4..0]==17)OR(wire_cnt[4..0]==18)OR
- (wire_cnt[4..0]==22)OR(wire_cnt[4..0]==24)OR(wire_cnt[4..0]==26);
- End;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement