Sha256: 04386fc67cd1c8f574f4dde85c68bc92e5d07ab3ba80d8026ed2d7ad1564eaba
Contents?: true
Size: 1.24 KB
Versions: 1
Compression:
Stored size: 1.24 KB
Contents
module OrigenAhbDev # Top-level chip model for development and unit testing class DUT include Origen::TopLevel include OrigenAhb # Initializer method to setup dut def initialize(options = {}) instantiate_pins(options) instantiate_registers(options) instantiate_sub_blocks(options) end # Add standard DUT pins and pins necessary for AHB protocol def instantiate_pins(options = {}) # 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 # Create a top-level test register def instantiate_registers(options = {}) add_reg :top_reg, 0x20000000, 32, data: { pos: 0, bits: 32 } end # Create a sub-block for test dut def instantiate_sub_blocks(options = {}) sub_block :block, class_name: 'OrigenAhbDev::BLOCK', base_address: 0x2200_0000 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
origen_ahb-0.2.3 | lib/origen_ahb_dev/dut.rb |