summaryrefslogtreecommitdiff
path: root/tests/fsm/generate.py
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-08-14 11:22:45 +0200
committerClifford Wolf <clifford@clifford.at>2014-08-14 11:22:45 +0200
commit28cf48e31f049f8343023de46cd916ac47fcfc5d (patch)
treea9f23f5705ab78e95a5f03cd55430942beae6862 /tests/fsm/generate.py
parent996c06f64dcb1619584c88d101c5ba258b2b26af (diff)
Some improvements in FSM mapping and recoding
Diffstat (limited to 'tests/fsm/generate.py')
-rw-r--r--tests/fsm/generate.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/fsm/generate.py b/tests/fsm/generate.py
index 66ca2af5..b5b4626d 100644
--- a/tests/fsm/generate.py
+++ b/tests/fsm/generate.py
@@ -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)