mirror of
https://github.com/Silicon1602/srdl2sv.git
synced 2025-04-19 13:02:57 +00:00
128 lines
4.4 KiB
YAML
128 lines
4.4 KiB
YAML
---
|
|
header: |-
|
|
/*****************************************************************
|
|
*
|
|
* ███████╗██████╗ ██████╗ ██╗ ██████╗ ███████╗██╗ ██╗
|
|
* ██╔════╝██╔══██╗██╔══██╗██║ ╚════██╗██╔════╝██║ ██║
|
|
* ███████╗██████╔╝██║ ██║██║ █████╔╝███████╗██║ ██║
|
|
* ╚════██║██╔══██╗██║ ██║██║ ██╔═══╝ ╚════██║╚██╗ ██╔╝
|
|
* ███████║██║ ██║██████╔╝███████╗███████╗███████║ ╚████╔╝
|
|
* ╚══════╝╚═╝ ╚═╝╚═════╝ ╚══════╝╚══════╝╚══════╝ ╚═══╝
|
|
*
|
|
* The present RTL was generated by srdl2sv v{version}. The RTL and all
|
|
* templates the RTL is derived from are licensed under the MIT
|
|
* license. The license is shown below.
|
|
*
|
|
* srdl2sv itself is licensed under GPLv3.
|
|
*
|
|
* Maintainer : Dennis Potter <dennis@dennispotter.eu>
|
|
* Report Bugs: https://git.dennispotter.eu/Dennis/srdl2sv/issues
|
|
*
|
|
* ===GENERATION INFORMATION======================================
|
|
*
|
|
* Generation information:
|
|
* - User: : {user}
|
|
* - Time : {time}
|
|
* - Path : {path}
|
|
* - RDL file : {rdl_file}
|
|
* - Hostname : {host}
|
|
*
|
|
* RDL include directories:
|
|
* - {incdirs}
|
|
*
|
|
* Commandline arguments to srdl2sv:
|
|
* - {config}
|
|
*
|
|
* ===LICENSE OF {addrmap}.SV=====================================
|
|
*
|
|
* Copyright {year} Dennis Potter <dennis@dennispotter.eu>
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person
|
|
* obtaining a copy of this software and associated documentation
|
|
* files (the "Software"), to deal in the Software without
|
|
* restriction, including without limitation the rights to use,
|
|
* copy, modify, merge, publish, distribute, sublicense, and/or
|
|
* sell copies of the Software, and to permit persons to whom the
|
|
* Software is furnished to do so, subject to the following
|
|
* conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be
|
|
* included in all copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
* OTHER DEALINGS IN THE SOFTWARE.
|
|
****************************************************************/
|
|
|
|
module_declaration:
|
|
rtl: |-
|
|
module {name}
|
|
<<INDENT>>
|
|
{import_package_list}
|
|
<<UNINDENT>>
|
|
(
|
|
<<INDENT>>
|
|
// Clock & Resets
|
|
input reg_clk,
|
|
input bus_clk,
|
|
input bus_rst_n,
|
|
{resets}
|
|
|
|
// Inputs
|
|
{inputs}
|
|
|
|
// Outputs
|
|
{outputs}
|
|
<<UNINDENT>>
|
|
);
|
|
import_package:
|
|
rtl: |-
|
|
import {name}_pkg::*;
|
|
reset_port:
|
|
rtl:
|
|
input {name},
|
|
input_port:
|
|
rtl:
|
|
input {signal_type:{signal_width}} {name:{name_width}}{unpacked_dim},
|
|
output_port:
|
|
rtl:
|
|
output {signal_type:{signal_width}} {name:{name_width}}{unpacked_dim},
|
|
signal_declaration: |-
|
|
{type:{signal_width}} {name:{name_width}}{unpacked_dim};
|
|
package_declaration:
|
|
rtl: |-
|
|
package {name}_pkg;
|
|
|
|
{pkg_content}
|
|
|
|
endpackage
|
|
enum_declaration:
|
|
rtl: |-
|
|
typedef enum logic [{width}:0] {{
|
|
{enum_var_list}
|
|
}} {name};
|
|
enum_var_list_item:
|
|
rtl: |-
|
|
{name:{max_name_width}} = {width}'d{value}
|
|
read_mux:
|
|
rtl: |-
|
|
|
|
// Read multiplexer
|
|
always_comb
|
|
begin
|
|
case(addr)
|
|
{list_of_cases}
|
|
endcase
|
|
end
|
|
default_mux_case:
|
|
rtl: |-
|
|
default: sw_rd_bus = 0;
|
|
list_of_mux_cases:
|
|
rtl: |-
|
|
32'd{}: sw_rd_bus = {};
|