Commit 7f405392 authored by Grzegorz Daniluk's avatar Grzegorz Daniluk Committed by Tomasz Wlostowski

cgen_doc_latex: print SW Offset instead of HW Addr in Memory Map Summary

parent 8fbd2914
......@@ -69,12 +69,12 @@ function cgen_doc_lx_memmap()
emit('\\resizebox{\\textwidth}{!}{');
emit('\\begin{tabular}{|l|l|l|l|l|}');
emit('\\rowcolor{RoyalPurple}');
emit('\\color{white} H/W Addr & \\color{white} Type & \\color{white} Name &');
emit('\\color{white} SW Offset & \\color{white} Type & \\color{white} Name &');
emit('\\color{white} HW prefix & \\color{white} C prefix\\\\');
foreach_reg({TYPE_REG}, function(reg)
if(reg.full_hdl_prefix ~= nil) then
reg_text = string.format("0x%x", reg.base)..'& ';
reg_text = string.format("0x%x", reg.base * (DATA_BUS_WIDTH/8))..'& ';
if(reg.doc_is_fiforeg == nil) then
reg_text = reg_text.."REG & ";
......@@ -91,7 +91,7 @@ function cgen_doc_lx_memmap()
foreach_reg({TYPE_RAM}, function(reg)
if(reg.full_hdl_prefix ~= nil) then
reg_text = string.format("0x%x - 0x%x", reg.base, reg.base+math.pow(2, reg.wrap_bits)*reg.size-1)..'& ';
reg_text = string.format("0x%x - 0x%x", reg.base*(DATA_BUS_WIDTH/8), reg.base*(DATA_BUS_WIDTH/8)+(math.pow(2, reg.wrap_bits)*reg.size-1)*DATA_BUS_WIDTH/8)..'& ';
reg_text = reg_text.."MEM & "..reg.name.." & "..reg.full_hdl_prefix.." & "..string.upper(reg.c_prefix).."\\\\";
reg_text = string.gsub(reg_text, "_", "\\_");
......
......@@ -2590,11 +2590,11 @@ emit('\\rowcolors{2}{gray!25}{white}');
emit('\\resizebox{\\textwidth}{!}{');
emit('\\begin{tabular}{|l|l|l|l|l|}');
emit('\\rowcolor{RoyalPurple}');
emit('\\color{white} H/W Addr & \\color{white} Type & \\color{white} Name &');
emit('\\color{white} SW Offset & \\color{white} Type & \\color{white} Name &');
emit('\\color{white} HW prefix & \\color{white} C prefix\\\\');
foreach_reg({TYPE_REG},function(t)
if(t.full_hdl_prefix~=nil)then
e=string.format("0x%x",t.base)..'& ';
e=string.format("0x%x",t.base*(DATA_BUS_WIDTH/8))..'& ';
if(t.doc_is_fiforeg==nil)then
e=e.."REG & ";
else
......@@ -2607,7 +2607,7 @@ end
end);
foreach_reg({TYPE_RAM},function(t)
if(t.full_hdl_prefix~=nil)then
e=string.format("0x%x - 0x%x",t.base,t.base+math.pow(2,t.wrap_bits)*t.size-1)..'& ';
e=string.format("0x%x - 0x%x",t.base*(DATA_BUS_WIDTH/8),t.base*(DATA_BUS_WIDTH/8)+(math.pow(2,t.wrap_bits)*t.size-1)*DATA_BUS_WIDTH/8)..'& ';
e=e.."MEM & "..t.name.." & "..t.full_hdl_prefix.." & "..string.upper(t.c_prefix).."\\\\";
e=string.gsub(e,"_","\\_");
emit(e);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment