fix 1x rom names
This commit is contained in:
parent
ff20fdb2d6
commit
7b168dd25b
Binary file not shown.
@ -219,24 +219,24 @@ cFuncsByName = {
|
||||
["demux 7 bit vertical"] = 77,
|
||||
["demux 8 bit"] = 78,
|
||||
["demux 8 bit vertical"] = 78,
|
||||
["rom 4x4x1"] = 79,
|
||||
["rom 4x4"] = 79,
|
||||
["rom 4x4x4"] = 80,
|
||||
["rom 8x2x8"] = 81,
|
||||
["rom 8x8x1"] = 82,
|
||||
["rom 8x8"] = 82,
|
||||
["rom 8x8x4"] = 83,
|
||||
["rom 8x8x8"] = 84,
|
||||
["rom 16x4x16"] = 85,
|
||||
["rom 32x2x32"] = 86,
|
||||
["rom 64x1x48"] = 87,
|
||||
["rom 64x1x64"] = 88,
|
||||
["rom 16x16x1"] = 89,
|
||||
["rom 16x16"] = 89,
|
||||
["rom 16x16x4"] = 90,
|
||||
["rom 16x16x8"] = 91,
|
||||
["rom 16x16x16"] = 92,
|
||||
["rom 32x8x32"] = 93,
|
||||
["rom 64x4x48"] = 94,
|
||||
["rom 64x4x64"] = 95,
|
||||
["rom 32x16x1"] = 96,
|
||||
["rom 32x16"] = 96,
|
||||
["rom 32x16x4"] = 97,
|
||||
["rom 32x16x8"] = 98,
|
||||
["rom 32x16x16"] = 99,
|
||||
@ -277,24 +277,24 @@ cDataSizeByName = {
|
||||
["demux 7 bit vertical"] = 1,
|
||||
["demux 8 bit"] = 1,
|
||||
["demux 8 bit vertical"] = 1,
|
||||
["rom 4x4x1"] = 16,
|
||||
["rom 4x4"] = 16,
|
||||
["rom 4x4x4"] = 64,
|
||||
["rom 8x2x8"] = 128,
|
||||
["rom 8x8x1"] = 64,
|
||||
["rom 8x8"] = 64,
|
||||
["rom 8x8x4"] = 256,
|
||||
["rom 8x8x8"] = 512,
|
||||
["rom 16x4x16"] = 1024,
|
||||
["rom 32x2x32"] = 2048,
|
||||
["rom 64x1x48"] = 3072,
|
||||
["rom 64x1x64"] = 4096,
|
||||
["rom 16x16x1"] = 256,
|
||||
["rom 16x16"] = 256,
|
||||
["rom 16x16x4"] = 1024,
|
||||
["rom 16x16x8"] = 2048,
|
||||
["rom 16x16x16"] = 4096,
|
||||
["rom 32x8x32"] = 8192,
|
||||
["rom 64x4x48"] = 12288,
|
||||
["rom 64x4x64"] = 16384,
|
||||
["rom 32x16x1"] = 512,
|
||||
["rom 32x16"] = 512,
|
||||
["rom 32x16x4"] = 2048,
|
||||
["rom 32x16x8"] = 4096,
|
||||
["rom 32x16x16"] = 8192,
|
||||
|
@ -72,7 +72,7 @@ local function createBuffer (n) return { name = "Buffer" ..n, names = {"Buffer "
|
||||
local function createDFF (n) return { name = "DFF" ..n, names = {"D FlipFlop " ..n.." Bit", "D FlipFlop " ..n.." Bit Up", "D FlipFlop " ..n.." Bit Down"}, func = "if(getport("..(n*2+1)..")) { copyword("..n..", 1, "..(n+1).."); }" } end
|
||||
local function createMux(n) return { name = "Mux"..n, names = {"Mux "..n.." Bit", "Mux "..n.." Bit Vertical"}, func = "if(getport("..(n+math.pow(2,n)+1)..")) { setport("..(n+math.pow(2,n)+2)..", getport(getword("..n..", 1)+"..(n+1)..")); } else { setport("..(n+math.pow(2,n)+2)..", 0); }"} end
|
||||
local function createDemux(n) return { name = "Demux"..n, names = {"Demux "..n.." Bit", "Demux "..n.." Bit Vertical"}, size = 1, func = "int pa = getdata(0); if(getport("..(n+math.pow(2,n)+1)..")) { int a = getword("..n..", 1) + "..(n+1).."; if(pa != a) { if(pa) { setport(pa, 0); } setport(a, 1); setdata(0, a); } } else { if(pa) { setport(pa, 0); setdata(0, 0); } }"} end
|
||||
local function createRom(x, y, z) local w = log2(x*y); return {name = "Rom"..w.."x"..z, names = {"ROM "..x.."x"..y.."x"..z}, size = x*y*z, func="if(getport("..(w+z+1)..")) { int a = getword("..w..", 1); for(int i=0; i<"..z.."; i++) { setport("..(w+1).."+i, getdata(a + i*"..(x*y)..")); } } else { clearword("..z..", "..(w+1).."); }" } end
|
||||
local function createRom(x, y, z) local w = log2(x*y); return {name = "Rom"..w.."x"..z, names = {"ROM "..x.."x"..y..(z>1 and ("x"..z) or "")}, size = x*y*z, func="if(getport("..(w+z+1)..")) { int a = getword("..w..", 1); for(int i=0; i<"..z.."; i++) { setport("..(w+1).."+i, getdata(a + i*"..(x*y)..")); } } else { clearword("..z..", "..(w+1).."); }" } end
|
||||
|
||||
local romsizes = { -- copied from brick gen
|
||||
-- 1 bit data 4 bit data 8 bit data 16 bit data 32 bit data 48 bit data 64 bit data
|
||||
|
Loading…
x
Reference in New Issue
Block a user