mirror of https://github.com/VLSIDA/OpenRAM.git
Template section clone method
This commit is contained in:
parent
5bbb8eae4c
commit
a7db6d182e
|
|
@ -38,6 +38,8 @@ class verilog:
|
||||||
self.template.setTextDict('GND', self.gnd_name)
|
self.template.setTextDict('GND', self.gnd_name)
|
||||||
|
|
||||||
for port in self.all_ports:
|
for port in self.all_ports:
|
||||||
|
self.template.cloneSection("PORTS", "PORTS" + str(port))
|
||||||
|
|
||||||
if port in self.readwrite_ports:
|
if port in self.readwrite_ports:
|
||||||
self.vf.write("// Port {0}: RW\n".format(port))
|
self.vf.write("// Port {0}: RW\n".format(port))
|
||||||
elif port in self.read_ports:
|
elif port in self.read_ports:
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
#>WRITE_SIZE_CMT
|
#>WRITE_SIZE_CMT
|
||||||
|
|
||||||
module #$MODULE_NAME$# (
|
module #$MODULE_NAME$# (
|
||||||
|
#<PORTS
|
||||||
`ifdef USE_POWER_PINS
|
`ifdef USE_POWER_PINS
|
||||||
#$VDD$#,
|
#$VDD$#,
|
||||||
#$GND$#,
|
#$GND$#,
|
||||||
|
|
@ -28,6 +29,7 @@ module #$MODULE_NAME$# (
|
||||||
// Port #$PORT_NUM$#: W
|
// Port #$PORT_NUM$#: W
|
||||||
clk#$PORT_NUM#$,csb#$PORT_NUM$#,web$#PORT_NUM$#,addr#PORT_NUM$#,din#PORT_NUM$#
|
clk#$PORT_NUM#$,csb#$PORT_NUM$#,web$#PORT_NUM$#,addr#PORT_NUM$#,din#PORT_NUM$#
|
||||||
#>W_PORT
|
#>W_PORT
|
||||||
|
#>PORTS
|
||||||
);
|
);
|
||||||
#<WMASK_PAR
|
#<WMASK_PAR
|
||||||
parameter NUM_WMASK = #$NUM_WMASK#$ ;
|
parameter NUM_WMASK = #$NUM_WMASK#$ ;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue