From WikiChip
Difference between revisions of "Module:process nodes"

Line 26: Line 26:
 
if not frame.args['fab ' .. i .. ' name'] then break end
 
if not frame.args['fab ' .. i .. ' name'] then break end
 
fdate:tag('td'):attr('colspan', '2'):wikitext(frame.args['fab ' .. i .. ' date'])
 
fdate:tag('td'):attr('colspan', '2'):wikitext(frame.args['fab ' .. i .. ' date'])
end comptbl:node(fdate)
+
end
 +
comptbl:node(fdate)
 
 
 
-- wafer type
 
-- wafer type
Line 33: Line 34:
 
if not frame.args['fab ' .. i .. ' wafer.type'] then break end
 
if not frame.args['fab ' .. i .. ' wafer.type'] then break end
 
wtype:tag('td'):attr('colspan', '2'):wikitext(frame.args['fab ' .. i .. ' wafer.type'])
 
wtype:tag('td'):attr('colspan', '2'):wikitext(frame.args['fab ' .. i .. ' wafer.type'])
end comptbl:node(wtype)
+
end
 +
comptbl:node(wtype)
 
 
 
-- xtor tech
 
-- xtor tech
Line 40: Line 42:
 
if not frame.args['fab ' .. i .. ' xtor.tech'] then break end
 
if not frame.args['fab ' .. i .. ' xtor.tech'] then break end
 
xtorsize:tag('td'):attr('colspan', '2'):wikitext(frame.args['fab ' .. i .. ' xtor.tech'])
 
xtorsize:tag('td'):attr('colspan', '2'):wikitext(frame.args['fab ' .. i .. ' xtor.tech'])
end comptbl:node(xtorsize)
+
end
 +
comptbl:node(xtorsize)
 
 
 
-- xtor type
 
-- xtor type
Line 47: Line 50:
 
if not frame.args['fab ' .. i .. ' xtor.type'] then break end
 
if not frame.args['fab ' .. i .. ' xtor.type'] then break end
 
xtortype:tag('td'):attr('colspan', '2'):wikitext(frame.args['fab ' .. i .. ' xtor.type'])
 
xtortype:tag('td'):attr('colspan', '2'):wikitext(frame.args['fab ' .. i .. ' xtor.type'])
end comptbl:node(xtortype)
+
end
 +
comptbl:node(xtortype)
 
 
 
-- xtor voltage
 
-- xtor voltage
Line 54: Line 58:
 
if not frame.args['fab ' .. i .. ' xtor.volt'] then break end
 
if not frame.args['fab ' .. i .. ' xtor.volt'] then break end
 
xtorvolt:tag('td'):attr('colspan', '2'):wikitext(frame.args['fab ' .. i .. ' xtor.volt'])
 
xtorvolt:tag('td'):attr('colspan', '2'):wikitext(frame.args['fab ' .. i .. ' xtor.volt'])
end comptbl:node(xtorvolt)
+
end
 +
comptbl:node(xtorvolt)
 
 
 
-- metal layers
 
-- metal layers
Line 61: Line 66:
 
if not frame.args['fab ' .. i .. ' layers'] then break end
 
if not frame.args['fab ' .. i .. ' layers'] then break end
 
layers:tag('td'):attr('colspan', '2'):wikitext(frame.args['fab ' .. i .. ' layers'])
 
layers:tag('td'):attr('colspan', '2'):wikitext(frame.args['fab ' .. i .. ' layers'])
end comptbl:node(layers)
+
end
 +
comptbl:node(layers)
 
 
 
 
Line 80: Line 86:
 
diffrom:tag('th'):wikitext(frame.args['fab ' .. i .. ' diff from'])
 
diffrom:tag('th'):wikitext(frame.args['fab ' .. i .. ' diff from'])
 
end
 
end
end comptbl:node(diffrom)
+
end
 +
comptbl:node(diffrom)
 +
 
 +
 
 +
-- diff from
 +
    local gatelength = mw.html.create('tr')
 +
    for i = 1, 10 do
 +
if not frame.args['fab ' .. i .. ' xtor.lg'] then break end
 +
diffrom:tag('td'):wikitext(frame.args['fab ' .. i .. ' xtor.lg'])
 +
if frame.args['fab ' .. i .. ' diff from'] ~= '@' then
 +
diffrom:tag('td'):wikitext(frame.args['fab ' .. i .. ' xtor.lgΔ'])
 +
end
 +
end
 +
comptbl:node(diffrom)
 
 
 
      
 
      

Revision as of 07:27, 8 April 2017

Doc:

{{#invoke:process nodes
 | compare
 | fab 1 name link   = 
 | fab 1 name        = 
 | fab 1 proc name   = 
 | fab 1 date        = 
 | fab 1 wafer.type  = 
 | fab 1 wafer.size  = 
 | fab 1 xtor.tech   = 
 | fab 1 xtor.type   = 
 | fab 1 xtor.volt   = 
 | fab 1 layers      = 
 | fab 1 diff from   = 
 | fab 1 xtor.lg     = 
 | fab 1 xtor.lgΔ    = 
 | fab 1 xtor.cpp    = 
 | fab 1 xtor.cppΔ   = 
 | fab 1 xtor.mmp    = 
 | fab 1 xtor.mmpΔ   = 
 | fab 1 sram.hp     = 
 | fab 1 sram.hpΔ    = 
 | fab 1 sram.hd     = 
 | fab 1 sram.hdΔ    = 
 | fab 1 sram.lv     = 
 | fab 1 sram.lvΔ    = 
 | fab 1 dram.edram  = 
 | fab 1 dram.edramΔ = 

 | fab 2 name link   = 
 | fab 2 name        = 
 | fab 2 proc name   = 
 | fab 2 date        = 
 | fab 2 wafer.type  = 
 | fab 2 wafer.size  = 
 | fab 2 xtor.tech   = 
 | fab 2 xtor.type   = 
 | fab 2 xtor.volt   = 
 | fab 2 layers      = 
 | fab 2 diff from   = 
 | fab 2 xtor.lg     = 
 | fab 2 xtor.lgΔ    = 
 | fab 2 xtor.cpp    = 
 | fab 2 xtor.cppΔ   = 
 | fab 2 xtor.mmp    = 
 | fab 2 xtor.mmpΔ   = 
 | fab 2 sram.hp     = 
 | fab 2 sram.hpΔ    = 
 | fab 2 sram.hd     = 
 | fab 2 sram.hdΔ    = 
 | fab 2 sram.lv     = 
 | fab 2 sram.lvΔ    = 
 | fab 2 dram.edram  = 
 | fab 2 dram.edramΔ  = 

 | fab 3 name link   = 
 | fab 3 name        = 
 | fab 3 proc name   = 
 | fab 3 date        = 
 | fab 3 wafer.type  = 
 | fab 3 wafer.size  = 
 | fab 3 xtor.tech   = 
 | fab 3 xtor.type   = 
 | fab 3 xtor.volt   = 
 | fab 3 layers      = 
 | fab 3 diff from   = 
 | fab 3 xtor.lg     = 
 | fab 3 xtor.lgΔ    = 
 | fab 3 xtor.cpp    = 
 | fab 3 xtor.cppΔ   = 
 | fab 3 xtor.mmp    = 
 | fab 3 xtor.mmpΔ   = 
 | fab 3 sram.hp     = 
 | fab 3 sram.hpΔ    = 
 | fab 3 sram.hd     = 
 | fab 3 sram.hdΔ    = 
 | fab 3 sram.lv     = 
 | fab 3 sram.lvΔ    = 
 | fab 3 dram.edram  = 
 | fab 3 dram.edramΔ  = 

 | fab 4 name link   = 
 | fab 4 name        = 
 | fab 4 proc name   = 
 | fab 4 date        = 
 | fab 4 wafer.type  = 
 | fab 4 wafer.size  = 
 | fab 4 xtor.tech   = 
 | fab 4 xtor.type   = 
 | fab 4 xtor.volt   = 
 | fab 4 layers      = 
 | fab 4 diff from   = 
 | fab 4 xtor.lg     = 
 | fab 4 xtor.lgΔ    = 
 | fab 4 xtor.cpp    = 
 | fab 4 xtor.cppΔ   = 
 | fab 4 xtor.mmp    = 
 | fab 4 xtor.mmpΔ   = 
 | fab 4 sram.hp     = 
 | fab 4 sram.hpΔ    = 
 | fab 4 sram.hd     = 
 | fab 4 sram.hdΔ    = 
 | fab 4 sram.lv     = 
 | fab 4 sram.lvΔ    = 
 | fab 4 dram.edram  = 
 | fab 4 dram.edramΔ  = 

 | fab 5 name link   = 
 | fab 5 name        = 
 | fab 5 proc name   = 
 | fab 5 date        = 
 | fab 5 wafer.type  = 
 | fab 5 wafer.size  = 
 | fab 5 xtor.tech   = 
 | fab 5 xtor.type   = 
 | fab 5 xtor.volt   = 
 | fab 5 layers      = 
 | fab 5 diff from   = 
 | fab 5 xtor.lg     = 
 | fab 5 xtor.lgΔ    = 
 | fab 5 xtor.cpp    = 
 | fab 5 xtor.cppΔ   = 
 | fab 5 xtor.mmp    = 
 | fab 5 xtor.mmpΔ   = 
 | fab 5 sram.hp     = 
 | fab 5 sram.hpΔ    = 
 | fab 5 sram.hd     = 
 | fab 5 sram.hdΔ    = 
 | fab 5 sram.lv     = 
 | fab 5 sram.lvΔ    = 
 | fab 5 dram.edram  = 
 | fab 5 dram.edramΔ  = 
}}

local p = {}

-- 

function p.compare(frame)
    local comptbl = mw.html.create('table')

    comptbl
        :attr('style', 'text-align: center;')
        :attr('class', 'chip-infobox')
        :attr('class', 'wikitable')
        
    -- foundry name
    local fabs = mw.html.create('tr')
    for i = 1, 10 do
		if not frame.args['fab ' .. i .. ' name'] then break end
		fabs:tag('th'):attr('colspan', '2'):wikitext('[[' 
			.. (frame.args['fab ' .. i .. ' name link'] and frame.args['fab ' .. i .. ' name link'] or frame.args['fab ' .. i .. ' name'])
			.. '|' .. frame.args['fab ' .. i .. ' name'] .. ']]')
	end
	comptbl:node(fabs)
	
    -- date
    local fdate = mw.html.create('tr')
    for i = 1, 10 do
		if not frame.args['fab ' .. i .. ' name'] then break end
		fdate:tag('td'):attr('colspan', '2'):wikitext(frame.args['fab ' .. i .. ' date'])
	end
	comptbl:node(fdate)
	
	-- wafer type
    local wtype = mw.html.create('tr')
    for i = 1, 10 do
		if not frame.args['fab ' .. i .. ' wafer.type'] then break end
		wtype:tag('td'):attr('colspan', '2'):wikitext(frame.args['fab ' .. i .. ' wafer.type'])
	end
	comptbl:node(wtype)
	
	-- xtor tech
    local xtorsize = mw.html.create('tr')
    for i = 1, 10 do
		if not frame.args['fab ' .. i .. ' xtor.tech'] then break end
		xtorsize:tag('td'):attr('colspan', '2'):wikitext(frame.args['fab ' .. i .. ' xtor.tech'])
	end
	comptbl:node(xtorsize)
	
	-- xtor type
    local xtortype = mw.html.create('tr')
    for i = 1, 10 do
		if not frame.args['fab ' .. i .. ' xtor.type'] then break end
		xtortype:tag('td'):attr('colspan', '2'):wikitext(frame.args['fab ' .. i .. ' xtor.type'])
	end	
	comptbl:node(xtortype)
	
	-- xtor voltage
    local xtorvolt = mw.html.create('tr')
    for i = 1, 10 do
		if not frame.args['fab ' .. i .. ' xtor.volt'] then break end
		xtorvolt:tag('td'):attr('colspan', '2'):wikitext(frame.args['fab ' .. i .. ' xtor.volt'])
	end
	comptbl:node(xtorvolt)
	
	-- metal layers
    local layers = mw.html.create('tr')
    for i = 1, 10 do
		if not frame.args['fab ' .. i .. ' layers'] then break end
		layers:tag('td'):attr('colspan', '2'):wikitext(frame.args['fab ' .. i .. ' layers'])
	end
	comptbl:node(layers)
	
	
	
	-- diff from
    local diffrom = mw.html.create('tr')
    for i = 1, 10 do
		if not frame.args['fab ' .. i .. ' diff from'] then break end
		
		if frame.args['fab ' .. i .. ' diff from'] == '@' then
			diffrom:tag('th'):wikitext('Value')
			diffrom:tag('th')
				:attr('rowspan', '10')
				:attr('style', 'background: #a3a3a3;')
				:wikitext('N/A')
		else
			diffrom:tag('th'):wikitext('Value')
			diffrom:tag('th'):wikitext(frame.args['fab ' .. i .. ' diff from'])
		end
	end
	comptbl:node(diffrom)


	-- diff from
    local gatelength = mw.html.create('tr')
    for i = 1, 10 do
		if not frame.args['fab ' .. i .. ' xtor.lg'] then break end
		diffrom:tag('td'):wikitext(frame.args['fab ' .. i .. ' xtor.lg'])
		if frame.args['fab ' .. i .. ' diff from'] ~= '@' then
			diffrom:tag('td'):wikitext(frame.args['fab ' .. i .. ' xtor.lgΔ'])
		end
	end
	comptbl:node(diffrom)
	
   	  
   	  
	return comptbl
end


return p