From WikiChip
Module:process nodes
Revision as of 06:17, 8 April 2017 by Inject (talk | contribs)

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('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)
	
	-- wafer size
    local wsize = mw.html.create('tr')
    for i = 1, 10 do
		if not frame.args['fab ' .. i .. ' wafer.size'] then break end
		wsize:tag('td'):attr('colspan', '2'):wikitext(frame.args['fab ' .. i .. ' wafer.size'])
	end	comptbl:node(wsize)
	
   	  
   	  
	return comptbl
end


return p