Skip to content

Commit

Permalink
Add one more delay state in the delay_0 pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Anders Ryd authored and aehart committed Oct 29, 2024
1 parent ace7648 commit 44a4ad0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion WriteVHDLSyntax.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ def writeTopLevelMemoryType(mtypeB, memList, memInfo, extraports, delay = 0, spl
parameterlist = ""
portlist = ""
delay_parameterlist = ""
delay_parameterlist_0 = ""
delay2_parameterlist = ""
delay_portlist_0 = ""
delay_portlist = ""
Expand Down Expand Up @@ -573,21 +574,27 @@ def writeTopLevelMemoryType(mtypeB, memList, memInfo, extraports, delay = 0, spl
if delay > 0:
delay2_parameterlist +=" DELAY => " + str(delay*2) +",\n"
delay_parameterlist +=" DELAY => " + str(delay) +",\n"
delay_parameterlist_0 +=" DELAY => " + str(delay+1) +",\n"
#enable to use non-default delay value
if "MPROJ" in mem:
#special case for the merged projections
delay_parameterlist +=" PAGE_LENGTH => 64,\n"
delay_parameterlist_0 +=" PAGE_LENGTH => 64,\n"
if "MPAR" in mem or "MPROJ" in mem:
#special case for the merged memories
delay_parameterlist +=" NUM_PAGES => "+str(4*num_pages)+",\n"
delay_parameterlist_0 +=" NUM_PAGES => "+str(4*num_pages)+",\n"
else:
delay_parameterlist +=" NUM_PAGES => "+str(num_pages)+",\n"
delay_parameterlist_0 +=" NUM_PAGES => "+str(num_pages)+",\n"
if memInfo.is_binned:
disk=""
if "VMSME_D" in mem:
disk = "*2"
delay_parameterlist +=" RAM_DEPTH => "+str(num_pages)+disk+"*PAGE_LENGTH_CM,\n"
delay_parameterlist_0 +=" RAM_DEPTH => "+str(num_pages)+disk+"*PAGE_LENGTH_CM,\n"
delay_parameterlist +=" RAM_WIDTH => "+bitwidth+",\n"
delay_parameterlist_0 +=" RAM_WIDTH => "+bitwidth+",\n"

ncopy = getVMStubNCopy(memmod);

Expand Down Expand Up @@ -792,7 +799,7 @@ def writeTopLevelMemoryType(mtypeB, memList, memInfo, extraports, delay = 0, spl
mem_str += " generic map (\n"+delay_parameterlist.rstrip(",\n")+"\n )\n"
mem_str += " port map (\n"+delay_portlist.rstrip(",\n")+"\n );\n\n"
mem_str += " "+mem+"_DELAY0 : entity work.tf_pipe_delay\n"
mem_str += " generic map (\n"+delay_parameterlist.rstrip(",\n")+"\n )\n"
mem_str += " generic map (\n"+delay_parameterlist_0.rstrip(",\n")+"\n )\n"
mem_str += " port map (\n"+delay_portlist_0.rstrip(",\n")+"\n );\n\n"

return wirelist,mem_str
Expand Down

0 comments on commit 44a4ad0

Please sign in to comment.