|
@@ -18,34 +18,6 @@ module synchronizer #(parameter width = 1, parameter stages = 2)
|
|
output [width-1:0] q
|
|
output [width-1:0] q
|
|
);
|
|
);
|
|
|
|
|
|
- // Quartus doesn't support $sformatf() for synthesis, sigh...
|
|
|
|
- function string tostr(input integer i);
|
|
|
|
- if (i < 0)
|
|
|
|
- tostr = {"-",tostr(-i)};
|
|
|
|
- else if (i >= 10)
|
|
|
|
- tostr = {tostr(i/10), tostr(i%10)};
|
|
|
|
- else if (i == 0)
|
|
|
|
- tostr = "0";
|
|
|
|
- else if (i == 1)
|
|
|
|
- tostr = "1";
|
|
|
|
- else if (i == 2)
|
|
|
|
- tostr = "2";
|
|
|
|
- else if (i == 3)
|
|
|
|
- tostr = "3";
|
|
|
|
- else if (i == 4)
|
|
|
|
- tostr = "4";
|
|
|
|
- else if (i == 5)
|
|
|
|
- tostr = "5";
|
|
|
|
- else if (i == 6)
|
|
|
|
- tostr = "6";
|
|
|
|
- else if (i == 7)
|
|
|
|
- tostr = "7";
|
|
|
|
- else if (i == 8)
|
|
|
|
- tostr = "8";
|
|
|
|
- else
|
|
|
|
- tostr = "9";
|
|
|
|
- endfunction
|
|
|
|
-
|
|
|
|
// SYNCHRONIZER_IDENTIFICATION FORCED identifies the *beginning* of
|
|
// SYNCHRONIZER_IDENTIFICATION FORCED identifies the *beginning* of
|
|
// the synchro; it needs to be used with AUTO for the other stages or
|
|
// the synchro; it needs to be used with AUTO for the other stages or
|
|
// the chains will be broken up for each stage.
|
|
// the chains will be broken up for each stage.
|