mirror of
https://github.com/myhdl/myhdl.git
synced 2025-01-24 21:52:56 +08:00
Merge from 0.6-maint
This commit is contained in:
commit
3ee96baf1f
@ -57,7 +57,7 @@ def enum(*names, **kwargs):
|
||||
raise ValueError("enum literals should be unique")
|
||||
if encoding == "one_hot":
|
||||
code = bin(1<<i, nrbits)
|
||||
elif encoding == "one_code":
|
||||
elif encoding == "one_cold":
|
||||
code = bin(~(1<<i), nrbits)
|
||||
else: # binary as default
|
||||
code = bin(i, nrbits)
|
||||
|
Loading…
x
Reference in New Issue
Block a user