Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. module toplevel {
  2. defparam myPole.offset = 95;
  3.  
  4. pole myPole();
  5. }
  6.  
  7. module pole {
  8. parameter offset = 0; // default value, overwritten by 95
  9.  
  10. localparam x = 1;
  11. localparam y = 2;
  12. localparam z = 3;
  13. localparam maxLength = 100;
  14.  
  15. localparam transitionConst = x + y + z + offset; // total is 101, this works as expected
  16.  
  17. if(transitionConst > maxLength){
  18. transitionConst = transistionConst - maxLength;
  19. } // transitionConst should wrap around 100, and be left with 1
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement