123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596openBaseopenHardcamlmoduletypeMaster_to_slave=Lite_ports.Master_to_slavemoduletypeSlave_to_master=Lite_ports.Slave_to_mastermoduletypeLite=sigmoduletypeMaster_to_slave=Master_to_slavemoduletypeSlave_to_master=Slave_to_mastermoduleMake(X:Master_slave_bus_config.S):sig(** A simplified protocol for reading from and writing to slave space within
a hardware design. Reads and writes are framed by [_valid] and [_first]
signals. The [_valid] signal will be high throughout the transaction,
while [_first] will toggle high only on the first cycle of a transaction.
The [_ready] signals, driven by the slave, indicate completion of
a transaction. *)moduleInternal_bus:Internal_bus.SmoduleMaster_to_slave:Master_to_slavemoduleSlave_to_master:Slave_to_master(** Statemachine for conversion between AXI transfers, and the simplified protocol
defined by [Internal_bus] *)moduleSlave_statemachine:moduletypeofSlave_statemachine.Make(Master_to_slave)(Slave_to_master)(Internal_bus)(** Statemachine for conversion from Ibus to AXI lite, with the Ibus as the master. *)moduleMaster_statemachine:moduletypeofMaster_statemachine.Make(Master_to_slave)(Slave_to_master)(Internal_bus)(** Convert a single AXI address range into multiple interface slave spaces. *)moduleDemultiplexer:sigtype'at=(Signal.tSlave_to_master.t,Signal.tInternal_bus.Master_to_slave.tlist)Slave_with_data.t[@@derivingsexp_of]valcreate:Scope.t->reg_spec:Reg_spec.t->address_offset:int->axi_master:Signal.tMaster_to_slave.t->int_slaves:Signal.tInternal_bus.Slave_to_master.tlist->Signal.ttend(** RAM with per byte enable and configurable size *)moduleRam_with_byte_enables:sigtypet=Signal.tSlave_to_master.t[@@derivingsexp_of]valcreate:Scope.t->reg_spec:Reg_spec.t->axi_master:Signal.tMaster_to_slave.t->size:int->tend(** Register bank attached directly to the AXI bus. Under the hood, this uses
{!Internal_bus.Register_bank} *)moduleRegister_bank:sigtype'at=(Signal.tSlave_to_master.t,Internal_bus.Register_bank.result)Slave_with_data.t[@@derivingsexp_of]valcreate:Scope.t->reg_spec:Reg_spec.t->axi_master:Signal.tMaster_to_slave.t->write_modes:Register_mode.tlist->read_values:Signal.tlist->Signal.ttmoduleWith_interface(Read:Interface.S)(Write:Interface.S):sigtypet=(Signal.tSlave_to_master.t,Signal.tWith_valid.tWrite.t)Slave_with_data.t[@@derivingsexp_of]valwrite_addresses:intWrite.tvalread_addresses:intRead.tvalcreate:Scope.t->reg_spec:Reg_spec.t->axi_master:Signal.tMaster_to_slave.t->write_modes:Register_mode.tWrite.t->read_values:Signal.tRead.t->tendendendend