aboutsummaryrefslogtreecommitdiffstats
path: root/tests/fsm
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2020-05-14 11:56:22 -0700
committerGitHub <noreply@github.com>2020-05-14 11:56:22 -0700
commit73b7ea713ce5d796985678b2732b3a5259d43639 (patch)
treef62376171f7401d5257f7d49d57743e90760b703 /tests/fsm
parent5bcde7ccc331e575682823222c97cc414bb3d808 (diff)
parentcd92a706aeef938625f6402d22825729e32649d8 (diff)
downloadyosys-73b7ea713ce5d796985678b2732b3a5259d43639.tar.gz
yosys-73b7ea713ce5d796985678b2732b3a5259d43639.tar.bz2
yosys-73b7ea713ce5d796985678b2732b3a5259d43639.zip
Merge pull request #1994 from YosysHQ/eddie/fix_bug1758
opt_expr: improve single-bit $and/$or/$xor/$xnor cells; gate cells too
Diffstat (limited to 'tests/fsm')
-rw-r--r--tests/fsm/generate.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/fsm/generate.py b/tests/fsm/generate.py
index c8eda0cd1..784e5a054 100644
--- a/tests/fsm/generate.py
+++ b/tests/fsm/generate.py
@@ -36,9 +36,11 @@ parser.add_argument('-S', '--seed', type = int, help = 'seed for PRNG')
parser.add_argument('-c', '--count', type = int, default = 50, help = 'number of test cases to generate')
args = parser.parse_args()
-if args.seed is not None:
- print("PRNG seed: %d" % args.seed)
- random.seed(args.seed)
+seed = args.seed
+if seed is None:
+ seed = random.randrange(sys.maxsize)
+print("PRNG seed: %d" % seed)
+random.seed(seed)
for idx in range(args.count):
with open('temp/uut_%05d.v' % idx, 'w') as f: