Header menu logo issie

Verilog Module

Types

Type Description

CompilationProfile

VMode

Functions and values

Function or value Description

activeComps fs

Full Usage: activeComps fs

Parameters:
Returns: FastComponent[]
fs : FastSimulation
Returns: FastComponent[]

extractRamDefinitions fs

Full Usage: extractRamDefinitions fs

Parameters:
Returns: (string * ComponentType)[]

get the module definitions (one per RAM instance) that define RAMs used TODO: make output more compact by using multiple instances of one module where possible. NB. Initial statement is used to initialise RAM as per simulation: should work with Quartus. NB - there is some inconsistency between this definition and current simulation, which will output ram[0] contents in clock 0 on q. the simulation is incompatible with FPGA tools and should change so that initial ram output is always 0.

fs : FastSimulation
Returns: (string * ComponentType)[]

fastOutputDefinition vType fc opn

Full Usage: fastOutputDefinition vType fc opn

Parameters:
Returns: string

what verilog declaration should the output signal have?

vType : VMode
fc : FastComponent
opn : OutputPortNumber
Returns: string

getDebugController profile fs

Full Usage: getDebugController profile fs

Parameters:
Returns: string[]
profile : CompilationProfile
fs : FastSimulation
Returns: string[]

getInitialSimulationBlock vType fs

Full Usage: getInitialSimulationBlock vType fs

Parameters:
Returns: string[]

make a simple testbench which displays module outputs for the first 30 clock cycles

vType : VMode
fs : FastSimulation
Returns: string[]

getInstanceOf block instanceName ports

Full Usage: getInstanceOf block instanceName ports

Parameters:
    block : string
    instanceName : string
    ports : string array

Returns: string

generate an instance of a module named block

block : string
instanceName : string
ports : string array
Returns: string

getInstantiatedModules fs

Full Usage: getInstantiatedModules fs

Parameters:
Returns: string[]

get all the RAM and ROM modules used NB at the moment each instance is made a separately named module, for simplicity

fs : FastSimulation
Returns: string[]

getMainHardware fs

Full Usage: getMainHardware fs

Parameters:
Returns: string[]

get the verilog statements output from each component

fs : FastSimulation
Returns: string[]

getMainHeader vType profile fs

Full Usage: getMainHeader vType profile fs

Parameters:
Returns: string[]

return the header of the main verilog module with hardware inputs and outputs in header.

vType : VMode
profile : CompilationProfile
fs : FastSimulation
Returns: string[]

getMainSignalDefinitions vType profile fs

Full Usage: getMainSignalDefinitions vType profile fs

Parameters:
Returns: string[]

return the wire and reg definitions needed to make the verilog design work.

vType : VMode
profile : CompilationProfile
fs : FastSimulation
Returns: string[]

getVPortInput fs fc arg3

Full Usage: getVPortInput fs fc arg3

Parameters:
Returns: string

Get string corresponding to name of signal that drives component input port

fs : FastSimulation
fc : FastComponent
arg2 : InputPortNumber
Returns: string

getVPortOut fc arg2

Full Usage: getVPortOut fc arg2

Parameters:
Returns: string

get output port name

fc : FastComponent
arg1 : OutputPortNumber
Returns: string

getVPortOutWithSlice fc opn

Full Usage: getVPortOutWithSlice fc opn

Parameters:
Returns: string

Get string corresponding to output port name with its width prepended as a Verilog slice. All output ports are internal wire or reg definitions.

fc : FastComponent
opn : OutputPortNumber
Returns: string

getVerilog vType fs profile

Full Usage: getVerilog vType fs profile

Parameters:
Returns: string

Outputs a string which contains a single verilog file with the hardware in verilog form. The top-level simulation moudle is called main - other modules may be included for RAM & ROM this can be called any time after after buildFastSimulation has created the initial FastSimulation data structure. To simulate this you would need to set up clk as a clock input, and provide stimulus for other inputs if there are any.

vType : VMode
fs : FastSimulation
profile : CompilationProfile
Returns: string

getVerilogBinaryOp gType op1 op2

Full Usage: getVerilogBinaryOp gType op1 op2

Parameters:
Returns: string

implement binary operator for two-input gate

gType : GateComponentType
op1 : string
op2 : string
Returns: string

getVerilogComponent fs fc

Full Usage: getVerilogComponent fs fc

Parameters:
Returns: string

Translates from a component to its Verilog description

fs : FastSimulation
fc : FastComponent
Returns: string

getVerilogNInputBinaryOp cType portConversionFn

Full Usage: getVerilogNInputBinaryOp cType portConversionFn

Parameters:
Returns: string

implement binary operator for multi-input gate

cType : ComponentType
portConversionFn : int -> string
Returns: string

getZeros width

Full Usage: getZeros width

Parameters:
    width : int

Returns: string

Create fixed width verilog zero. NB it seems this is not strictly needed, integer 0 works!

width : int
Returns: string

makeAccessPathIndex fs

Full Usage: makeAccessPathIndex fs

Parameters:
Returns: Map<ComponentId list, int>
fs : FastSimulation
Returns: Map<ComponentId list, int>

makeAsyncRamModule moduleName mem

Full Usage: makeAsyncRamModule moduleName mem

Parameters:
    moduleName : string
    mem : Memory1

Returns: string
moduleName : string
mem : Memory1
Returns: string

makeAsyncRomModule moduleName mem

Full Usage: makeAsyncRomModule moduleName mem

Parameters:
    moduleName : string
    mem : Memory1

Returns: string
moduleName : string
mem : Memory1
Returns: string

makeBits w c

Full Usage: makeBits w c

Parameters:
    w : int32
    c : bigint

Returns: string

get valid Verilog constant for bus of given width (may be 1)

w : int32
c : bigint
Returns: string

makeRamModule moduleName mem

Full Usage: makeRamModule moduleName mem

Parameters:
    moduleName : string
    mem : Memory1

Returns: string
moduleName : string
mem : Memory1
Returns: string

makeRomModule moduleName mem

Full Usage: makeRomModule moduleName mem

Parameters:
    moduleName : string
    mem : Memory1

Returns: string
moduleName : string
mem : Memory1
Returns: string

removeHybridComps fa

Full Usage: removeHybridComps fa

Parameters:
Returns: FastComponent[]
fa : FastComponent array
Returns: FastComponent[]

verilogNameConvert maxChars s

Full Usage: verilogNameConvert maxChars s

Parameters:
    maxChars : int
    s : string

Returns: string

take FullName and convert it into a verilog compatible form this is not 1-1, so outputs may not be unique, that is OK

maxChars : int
s : string
Returns: string

writeVerilogNames fs

Full Usage: writeVerilogNames fs

Parameters:

simple way to assign to each component and component output a unique verilog compatible name. outputs will become reg or wire signals in the Verilog

fs : FastSimulation

Type something to start searching.