# frozen_string_literal: true # Module containing template hashes for rvvm. module Templates @templates = {} @templates[:rvvmconf] = { file: { path: "./rvvm", name: "rvvmconf.json" }, conf: { prjname: "RVvM", prjpath: "~/rvvm/RVvM" }, content: %({ "project": { "name": "${prjname}", "path": "${prjpath}", "rvvmDir": "rvvm", "logDir": "logs", "company": " " }, "compilation": { "list": "${prjname}_compile_list.f", "logDir": "comp", "log": "comp.log", "args": "-L uvm" }, "dpi": { "dpilib": 0, "list": "dpi_compile_list.f", "args": " " }, "elaboration": { "tbTop": "${prjname}_tb_top", "tb": "${prjname}_tb", "timescale": "1ns/1ps", "customdpilib": "", "logDir": "elab", "log": "elab.log", "args": " " }, "simulation": { "logDir": "sim", "log": "${testname}.log", "verbosity": "LOW", "defTest": " ", "batch": 0, "testlist": [" "], "args": " " } }) } @templates[:compilelist] = { file: { path: "./rvvm", name: "RVvM_compile_list.f" }, conf: { prjname: "RVvM" }, content: %(-i ../design -i ../design/src -i ../verif/env -i ../verif/env/agents -i ../verif/env/top -i ../verif/tb/src -i ../verif/test -i ../verif/test/seq -i ../verif/test/src ../verif/tb/src/${prjname}_tb_top.sv ) } @templates[:wfcfg] = { file: { path: "./rvvm", name: "wfcfg.tcl" }, conf: {}, content: %(log_wave -recursive * run all exit ) } @templates[:dpilist] = { file: { path: "./rvvm", name: "dpi_compile_list.f" }, conf: {}, content: %(#list of DPI-C sources ) } @templates[:tbtop] = { file: { path: "./verif/tb/src", name: "RVvM_tb_top.sv" }, conf: { prjname: "RVvM", PRJNAME: "RVvM" }, content: %(`ifndef ${PRJNAME}_TB_TOP `define ${PRJNAME}_TB_TOP `include "uvm_macros.svh" import uvm_pkg::*; module ${prjname}_tb_top; //testbench implementation endmodule: ${prjname}_tb_top `endif//${PRJNAME}_TB_TOP ) } @templates[:module] = { file: { path: "design/src" }, conf: { type: "module", module: "best_rtl_module_ever", date: "01/01/2024 00:00", prjname: " ", company: " ", username: "me" }, content: %(////////////////////////////////////////////////////////////////////////////////// // Company: ${company} // Engineer: ${username} // // Create Date: ${date} // Project Name: ${prjname} // Module Name: ${module} // Target Devices: // Tool Versions: // Description: // // Dependencies: // // Revision: // Revision 0.01 - File Created // Additional Comments: // ////////////////////////////////////////////////////////////////////////////////// ${type} ${module}( ); end${type} ) } @templates[:package] = { file: { path: "design/pkg" }, conf: { package: "best_rtl_pkg", PACKAGE: "BEST_RTL_PACKAGE", date: "01/01/2024 00:00", prjname: " ", company: " ", username: "me" }, content: %(////////////////////////////////////////////////////////////////////////////////// // Company: ${company} // Engineer: ${username} // // Create Date: ${date} // Project Name: ${prjname} // Package Name: ${package} // Target Devices: // Tool Versions: // Description: // // Dependencies: // // Revision: // Revision 0.01 - File Created // Additional Comments: // ////////////////////////////////////////////////////////////////////////////////// `ifndef ${PACKAGE} `define ${PACKAGE} package ${package}; endpackage `endif//${PACKAGE} ) } @templates[:svfile] = { file: { path: "design/src" }, conf: { NAME: "BEST_RTL_FILE", date: "01/01/2024 00:00", prjname: " ", company: " ", username: "me" }, content: %(////////////////////////////////////////////////////////////////////////////////// // Company: ${company} // Engineer: ${username} // // Create Date: ${date} // Project Name: ${prjname} // Package Name: ${package} // Target Devices: // Tool Versions: // Description: // // Dependencies: // // Revision: // Revision 0.01 - File Created // Additional Comments: // ////////////////////////////////////////////////////////////////////////////////// `ifndef ${NAME} `define ${NAME} `endif//${NAME} ) } # Loads template hashes. # # @return [Hash] template hashes # # @since 0.8.0 def self.load @templates end end