mirror of https://github.com/YosysHQ/yosys.git
tests: fsm to use a randomly-generated seed
This commit is contained in:
parent
b5f38f8342
commit
7f203cb019
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue