Class: OrigenAhbDev::DUT
- Inherits:
-
Object
- Object
- OrigenAhbDev::DUT
- Includes:
- Origen::TopLevel, OrigenAhb
- Defined in:
- lib/origen_ahb_dev/dut.rb
Overview
Top-level chip model for development and unit testing
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ DUT
constructor
Initializer method to setup dut.
-
#instantiate_pins(options = {}) ⇒ Object
Add standard DUT pins and pins necessary for AHB protocol.
-
#instantiate_registers(options = {}) ⇒ Object
Create a top-level test register.
-
#instantiate_sub_blocks(options = {}) ⇒ Object
Create a sub-block for test dut.
Methods included from OrigenAhb
Constructor Details
#initialize(options = {}) ⇒ DUT
Initializer method to setup dut
8 9 10 11 12 |
# File 'lib/origen_ahb_dev/dut.rb', line 8 def initialize( = {}) instantiate_pins() instantiate_registers() instantiate_sub_blocks() end |
Instance Method Details
#instantiate_pins(options = {}) ⇒ Object
Add standard DUT pins and pins necessary for AHB protocol
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/origen_ahb_dev/dut.rb', line 15 def instantiate_pins( = {}) # Standard DUT pins add_pin :tclk add_pin :tdi add_pin :tdo add_pin :tms add_pin :resetb # AHB Control Signals add_pin :hclk add_pin :hready add_pin :hwrite add_pin :htrans, size: 2 add_pin :hburst, size: 3 add_pin :hmastlock add_pin :hsize, size: 3 add_pin :hprot, size: 3 # AHB Data Signals add_pin :haddr, size: 32 add_pin :hwdata, size: 32 add_pin :hrdata, size: 32 end |
#instantiate_registers(options = {}) ⇒ Object
Create a top-level test register
40 41 42 |
# File 'lib/origen_ahb_dev/dut.rb', line 40 def instantiate_registers( = {}) add_reg :top_reg, 0x20000000, 32, data: { pos: 0, bits: 32 } end |
#instantiate_sub_blocks(options = {}) ⇒ Object
Create a sub-block for test dut
45 46 47 |
# File 'lib/origen_ahb_dev/dut.rb', line 45 def instantiate_sub_blocks( = {}) sub_block :block, class_name: 'OrigenAhbDev::BLOCK', base_address: 0x2200_0000 end |