Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module toplevel {
- defparam myPole.offset = 95;
- pole myPole();
- }
- module pole {
- parameter offset = 0; // default value, overwritten by 95
- localparam x = 1;
- localparam y = 2;
- localparam z = 3;
- localparam maxLength = 100;
- localparam transitionConst = x + y + z + offset; // total is 101, this works as expected
- if(transitionConst > maxLength){
- transitionConst = transistionConst - maxLength;
- } // transitionConst should wrap around 100, and be left with 1
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement