rhea common components

The rhea top-level namespace includes a small collection of functions and objects that are commonly used in building subblocks (cores). This is a thin-layer in the software stack used to build complex digital systems.

The following is the list of the functions and objects in the rhea top-level namespace. See the information below for more details.

  1. rhea.Clock(init_val, frequency)
  2. rhea.Reset(init_val, active, isasync)
  3. rhea.Global()
  4. rhea.Constants(**named_constants)
  5. rhea.Signals(sigtype, num_sigs)
  6. rhea.syncro
  7. rhea.assign
class rhea.Clock(val, frequency=1)
class rhea.Reset(val, active, isasync)
class rhea.Global(clock=None, reset=None, frequency=1)
class rhea.Constants(**constargs)
rhea.Signals(sigtype, num_sigs)

Create a list of signals :param sigtype: The type to create a Signal from. :type sigtype: bool, intbv :param num_sigs: The number of signals to create in the list :type num_sigs: int

Returns:a list of signals all of type sigtype
Return type:sigs

Creating multiple signals of the same type is common, this function helps facilitate the creation of multiple signals of the same type.

The following example creates two signals of bool
>>> enable, timeout = Signals(bool(0), 2)
The following creates a list-of-signals of 8-bit types
>>> mem = Signals(intbv(0)[8:], 256)
rhea.assign()

assign a = b

rhea.syncro()

signal synchronizer

Parameters:
  • sigin – signal input.
  • sigout – synchronized signal output.
  • posedge – a positive edge in the sync
  • negedge – a negitive edge in the sync
  • num_sync_ff – the number of sync stages.

Examples