mirror of https://github.com/zachjs/sv2v.git
handle resetall when creating implicit nets
This commit is contained in:
parent
6eda946f57
commit
d3dbaf0684
|
|
@ -3,6 +3,7 @@
|
|||
### Bug Fixes
|
||||
|
||||
* Fixed `--write path/to/dir/` with directives like `` `default_nettype ``
|
||||
* Fixed `` `resetall `` not resetting the `` `default_nettype ``
|
||||
|
||||
### Other Enhancements
|
||||
|
||||
|
|
|
|||
|
|
@ -27,9 +27,12 @@ traverseDescription defaultNetType (PackageItem (Directive str)) =
|
|||
where
|
||||
prefix = "`default_nettype "
|
||||
defaultNetType' =
|
||||
if isPrefixOf prefix str
|
||||
then parseDefaultNetType $ drop (length prefix) str
|
||||
else defaultNetType
|
||||
if isPrefixOf prefix str then
|
||||
parseDefaultNetType $ drop (length prefix) str
|
||||
else if str == "`resetall" then
|
||||
Just TWire
|
||||
else
|
||||
defaultNetType
|
||||
traverseDescription defaultNetType description =
|
||||
(defaultNetType, partScoper traverseDeclM
|
||||
(traverseModuleItemM defaultNetType)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
`default_nettype none
|
||||
`resetall
|
||||
module top;
|
||||
assign y = 1;
|
||||
assign x = ~y;
|
||||
endmodule
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
module top;
|
||||
wire x, y;
|
||||
assign y = 1;
|
||||
assign x = ~y;
|
||||
endmodule
|
||||
Loading…
Reference in New Issue