Commit d3dbaf06 by Zachary Snow

handle resetall when creating implicit nets

parent 6eda946f
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
### Bug Fixes ### Bug Fixes
* Fixed `--write path/to/dir/` with directives like `` `default_nettype `` * Fixed `--write path/to/dir/` with directives like `` `default_nettype ``
* Fixed `` `resetall `` not resetting the `` `default_nettype ``
### Other Enhancements ### Other Enhancements
......
...@@ -27,9 +27,12 @@ traverseDescription defaultNetType (PackageItem (Directive str)) = ...@@ -27,9 +27,12 @@ traverseDescription defaultNetType (PackageItem (Directive str)) =
where where
prefix = "`default_nettype " prefix = "`default_nettype "
defaultNetType' = defaultNetType' =
if isPrefixOf prefix str if isPrefixOf prefix str then
then parseDefaultNetType $ drop (length prefix) str parseDefaultNetType $ drop (length prefix) str
else defaultNetType else if str == "`resetall" then
Just TWire
else
defaultNetType
traverseDescription defaultNetType description = traverseDescription defaultNetType description =
(defaultNetType, partScoper traverseDeclM (defaultNetType, partScoper traverseDeclM
(traverseModuleItemM defaultNetType) (traverseModuleItemM defaultNetType)
......
`default_nettype none
`resetall
module top;
assign y = 1;
assign x = ~y;
endmodule
module top;
wire x, y;
assign y = 1;
assign x = ~y;
endmodule
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment