Skip to content
This repository has been archived by the owner on Sep 18, 2019. It is now read-only.
/ odfi-rfg Public archive

TCL based extensible Register File Generator

License

GPL-3.0, LGPL-3.0 licenses found

Licenses found

GPL-3.0
LICENSE
LGPL-3.0
LICENSE.lesser
Notifications You must be signed in to change notification settings

unihd-cag/odfi-rfg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

The CAG RegisterFile Generator (RFG) is a TCL-based register file hierarchy description language, which generates hardware (Verilog RTL) and software interfaces for control and status registers to be used in an FPGA or ASIC design.

The full documentation can be found at http://unihd-cag.github.io/odfi-rfg/.

In the first step a register file definition is needed. Here an example (Example_RF.rf):

registerFile Example_RF {

    ::repeat 16 {
        register GPR_$i {
            field GPF {
                description "General purpose field"
                width 32
                reset 32'h0
                software rw
                hardware {
                    rw
                    software_written 1
                }
            }
        }
    }

    ramBlock RAM {
        width 16
        depth 256 
        software rw
        hardware rw
    }
}

In the second step in the RFG available generators can be applied on the description to generate the verilog, xml, and documentation files. For this a little generator script is written. In this example to create a verilog description and a xml representation:

readRF "Example_RF.rf"

generator verilog {
    destinationPath "verilog/"
}

generator xmlgenerator {
    destinationPath "xml/"
}

Available Generators

  • Hierarchical Verilog
  • HTML Documentation
  • Generic XML representation

Software Interfaces

  • Generic Scala API