Commit 1fb6c1d0 authored by Dimitris Lampridis's avatar Dimitris Lampridis

Also added versioning to all documentation and file headers.

TODO: except texinfo doc output!
parent 09a4e412
......@@ -87,6 +87,9 @@ function cgen_c_fileheader()
emit (" * File : "..options.output_c_header_file);
emit (" * Author : auto-generated by wbgen2 from "..input_wb_file);
emit (" * Created : "..os.date());
if (periph.version ~= nil) then
emit(" * Version : "..string.format('0x%08X', periph.version));
end
emit (" * Standard : ANSI C");
emit ("");
emit (" THIS FILE WAS GENERATED BY wbgen2 FROM SOURCE FILE "..input_wb_file);
......
......@@ -311,6 +311,9 @@ function cgen_doc_header_and_toc()
emit('<h1 class="heading">'..periph.hdl_entity..'</h1>');
emit('<h3>'..periph.name..'</h3>');
if (periph.version ~= nil) then
emit(string.format('<h3>[version 0x%08X]</h3>', periph.version));
end
local t = periph.description;
if(t == nil) then t = ""; end
emit('<p>'..string.gsub(t, "\n", "<br>")..'</p>');
......
......@@ -54,6 +54,10 @@ function cgen_doc_lx_header_and_toc()
emit('\\subsection{'..periph.name..'}');
emit('\\label{subsec:wbgen:'..periph.prefix..'}');
if (periph.version ~= nil) then
emit(string.format('\[version 0x%08X\]\\\\', periph.version));
end
local t = periph.description;
if(t == nil) then t = ""; end
emit(string.gsub(t, "\n", "\\\\"));
......
......@@ -19,6 +19,9 @@ function cgen_verilog_header()
emit("// File : "..options.output_hdl_file);
emit("// Author : auto-generated by wbgen2 from "..input_wb_file);
emit("// Created : "..os.date());
if (periph.version ~= nil) then
emit("// Version : "..string.format('0x%08X', periph.version));
end
emit("// Standard : Verilog 2001");
emit("//////////////////////////////////////////////////////////////////////////////////////");
emit("// THIS FILE WAS GENERATED BY wbgen2 FROM SOURCE FILE "..input_wb_file);
......
......@@ -200,6 +200,9 @@ function cgen_vhdl_header(file_name)
emit("-- File : "..file_name);
emit("-- Author : auto-generated by wbgen2 from "..input_wb_file);
emit("-- Created : "..os.date());
if (periph.version ~= nil) then
emit("-- Version : "..string.format('0x%08X', periph.version));
end
emit("-- Standard : VHDL'87");
emit("---------------------------------------------------------------------------------------");
emit("-- THIS FILE WAS GENERATED BY wbgen2 FROM SOURCE FILE "..input_wb_file);
......
......@@ -967,6 +967,9 @@ emit("--------------------------------------------------------------------------
emit("-- File : "..e);
emit("-- Author : auto-generated by wbgen2 from "..input_wb_file);
emit("-- Created : "..os.date());
if(periph.version~=nil)then
emit("-- Version : "..string.format('0x%08X',periph.version));
end
emit("-- Standard : VHDL'87");
emit("---------------------------------------------------------------------------------------");
emit("-- THIS FILE WAS GENERATED BY wbgen2 FROM SOURCE FILE "..input_wb_file);
......@@ -1422,6 +1425,9 @@ emit("//////////////////////////////////////////////////////////////////////////
emit("// File : "..options.output_hdl_file);
emit("// Author : auto-generated by wbgen2 from "..input_wb_file);
emit("// Created : "..os.date());
if(periph.version~=nil)then
emit("// Version : "..string.format('0x%08X',periph.version));
end
emit("// Standard : Verilog 2001");
emit("//////////////////////////////////////////////////////////////////////////////////////");
emit("// THIS FILE WAS GENERATED BY wbgen2 FROM SOURCE FILE "..input_wb_file);
......@@ -1853,6 +1859,9 @@ emit("");
emit(" * File : "..options.output_c_header_file);
emit(" * Author : auto-generated by wbgen2 from "..input_wb_file);
emit(" * Created : "..os.date());
if(periph.version~=nil)then
emit(" * Version : "..string.format('0x%08X',periph.version));
end
emit(" * Standard : ANSI C");
emit("");
emit(" THIS FILE WAS GENERATED BY wbgen2 FROM SOURCE FILE "..input_wb_file);
......@@ -2193,6 +2202,9 @@ emit('</HEAD>');
emit('<BODY>');
emit('<h1 class="heading">'..periph.hdl_entity..'</h1>');
emit('<h3>'..periph.name..'</h3>');
if(periph.version~=nil)then
emit(string.format('<h3>[version 0x%08X]</h3>',periph.version));
end
local e=periph.description;
if(e==nil)then e="";end
emit('<p>'..string.gsub(e,"\n","<br>")..'</p>');
......@@ -2593,6 +2605,9 @@ end
function cgen_doc_lx_header_and_toc()
emit('\\subsection{'..periph.name..'}');
emit('\\label{subsec:wbgen:'..periph.prefix..'}');
if(periph.version~=nil)then
emit(string.format('\[version 0x%08X\]\\\\',periph.version));
end
local e=periph.description;
if(e==nil)then e="";end
emit(string.gsub(e,"\n","\\\\"));
......
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