3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-22 13:53:40 +00:00

Some improvements in FSM mapping and recoding

This commit is contained in:
Clifford Wolf 2014-08-14 11:22:45 +02:00
parent 996c06f64d
commit 28cf48e31f
3 changed files with 18 additions and 9 deletions

View file

@ -52,7 +52,8 @@ for idx in range(50):
print(' output reg%s [%d:0] y;' % (random.choice(['', ' signed']), random.randint(0, 31)))
print(' output reg%s [%d:0] z;' % (random.choice(['', ' signed']), random.randint(0, 31)))
state_bits = random.randint(5, 16);
print(' reg [%d:0] state;' % (state_bits-1))
print(' %sreg [%d:0] state;' % (random.choice(['', '(* fsm_encoding = "one-hot" *)',
'(* fsm_encoding = "binary" *)']), state_bits-1))
states=[]
for i in range(random.randint(2, 10)):
n = random.randint(0, 2**state_bits-1)