Advertisement
Guest User

Untitled

a guest
Dec 9th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. INCLUDE "lpm_counter.inc";
  2. SUBDESIGN Lab
  3. (
  4. clock : INPUT;
  5. -- a[10..0] : OUTPUT;
  6. A : OUTPUT;
  7. )
  8. VARIABLE
  9. wire_cnt[4..0]:Node;
  10. cnt [10..0]:node;
  11. q[10..0]:node;
  12. lpm_counter_component : lpm_counter WITH (
  13. LPM_DIRECTION = "UP",
  14. LPM_PORT_UPDOWN = "PORT_UNUSED",
  15. LPM_TYPE = "LPM_COUNTER",
  16. LPM_WIDTH = 11
  17. );
  18. Begin
  19. q[10..0] = lpm_counter_component.q[10..0];
  20. lpm_counter_component.clock = clock;
  21. wire_cnt=q[10..6];
  22.  
  23. wire_cnt[4..0]=q[10..6];
  24. A=(wire_cnt[4..0]==0)OR(wire_cnt[4..0]==2)OR(wire_cnt[4..0]==4)OR
  25. (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
  26. (wire_cnt[4..0]==14)OR(wire_cnt[4..0]==16)OR(wire_cnt[4..0]==17)OR(wire_cnt[4..0]==18)OR
  27. (wire_cnt[4..0]==22)OR(wire_cnt[4..0]==24)OR(wire_cnt[4..0]==26);
  28.  
  29. End;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement