File tree Expand file tree Collapse file tree 3 files changed +14
-5
lines changed
clash-lib/src/Clash/Backend Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change
1
+ CHANGED: when generating (System)Verilog, Clash now resets the default net type from none to the verilog default after the generated module
Original file line number Diff line number Diff line change @@ -228,14 +228,17 @@ genSystemVerilog opts _ sp seen us c = do
228
228
where
229
229
cName = componentName c
230
230
verilog = commentHeader <> line <>
231
- nettype <> line <>
231
+ nettypeNone <> line <>
232
232
timescale <> line <>
233
- module_ c
233
+ module_ c <> line <>
234
+ nettypeDefault
235
+
234
236
commentHeader
235
237
= " /* AUTOMATICALLY GENERATED SYSTEMVERILOG-2005 SOURCE CODE."
236
238
<> line <> " ** GENERATED BY CLASH " <> string (Text. pack clashVer) <> " . DO NOT MODIFY."
237
239
<> line <> " */"
238
- nettype = " `default_nettype none"
240
+ nettypeNone = " `default_nettype none"
241
+ nettypeDefault = " `default_nettype wire"
239
242
timescale = " `timescale 100fs/" <> string (Text. pack precision)
240
243
precision = periodToString (opt_timescalePrecision opts)
241
244
Original file line number Diff line number Diff line change @@ -225,7 +225,11 @@ genVerilog opts _ sp seen usage c = do
225
225
usages .= usage
226
226
setSrcSpan sp
227
227
228
- v <- commentHeader <> line <> nettype <> line <> timescale <> line <> module_ c
228
+ v <- commentHeader <> line <>
229
+ nettypeNone <> line <>
230
+ timescale <> line <>
231
+ module_ c <> line <>
232
+ nettypeDefault
229
233
incs <- Ap $ use includes
230
234
return ((TextS. unpack (Id. toText cName), v), incs)
231
235
where
@@ -234,7 +238,8 @@ genVerilog opts _ sp seen usage c = do
234
238
= " /* AUTOMATICALLY GENERATED VERILOG-2001 SOURCE CODE."
235
239
<> line <> " ** GENERATED BY CLASH " <> string (Text. pack clashVer) <> " . DO NOT MODIFY."
236
240
<> line <> " */"
237
- nettype = " `default_nettype none"
241
+ nettypeNone = " `default_nettype none"
242
+ nettypeDefault = " `default_nettype wire"
238
243
timescale = " `timescale 100fs/" <> string (Text. pack precision)
239
244
precision = periodToString (opt_timescalePrecision opts)
240
245
You can’t perform that action at this time.
0 commit comments