Class: CrossOrigenDev::DUT

Inherits:
Object
  • Object
show all
Includes:
CrossOrigen, Origen::TopLevel
Defined in:
lib/cross_origen_dev/dut.rb

Overview

Simple DUT class used for testing

Defined Under Namespace

Classes: ATX2, ATX3, D_IP_ANA_TEST_ANNEX_SYN

Instance Method Summary collapse

Methods included from CrossOrigen

#cr_cmsis_svd, #cr_design_sync, #cr_headers, #cr_import, #cr_ip_xact, #cr_ralf, #cr_try, include_timestamp=, include_timestamp?, #instance_respond_to?, refresh?, #to_header, #to_ip_xact, #to_ralf

Constructor Details

#initializeDUT

Returns a new instance of DUT.



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/cross_origen_dev/dut.rb', line 7

def initialize
  @path = :hidden
  sub_block :atx, class_name: 'D_IP_ANA_TEST_ANNEX_SYN', base_address: 0x4000_0000

  # Register defined solely to test out the top level register export
  reg :dut_top_level_reg, 0x0, size: 32, bit_order: :msb0, lau: 8 do
    bit 15, :pls_work, reset: 1, access: :rw
    bit 14, :second_bit, reset: 0, access: :rw
  end
  # Register defined solely to test out the top level register export
  reg :dut_top_level_reg_number_two, 0x10, size: 32, bit_order: :lsb0, lau: 16 do
    bit 0, :pls_work, reset: 0, access: :ro
    bit 1, :second_bit, reset: 1, access: :rw
  end
  # Import some data from IP-XACT
  cr_import(path: "#{Origen.root}/imports/ipxact.xml")
end

Instance Method Details

#add_atx2Object

Import Spirit 1.4 version of ATX



26
27
28
# File 'lib/cross_origen_dev/dut.rb', line 26

def add_atx2
  sub_block :atx2, class_name: 'ATX2', base_address: 0x6000_0000
end

#add_atx3Object

Import 1685-2009 version of ATX



40
41
42
# File 'lib/cross_origen_dev/dut.rb', line 40

def add_atx3
  sub_block :atx3, class_name: 'ATX3', base_address: 0x7000_0000
end