Class: C99::SOC
- Inherits:
-
Object
- Object
- C99::SOC
- Includes:
- Origen::Callbacks, Origen::Pins, Origen::TopLevel
- Defined in:
- lib/c99/soc.rb
Instance Method Summary collapse
- #base_address(reg, options = {}) ⇒ Object
- #has_margin0_bug? ⇒ Boolean
-
#initialize ⇒ SOC
constructor
A new instance of SOC.
- #origen_dot_app ⇒ Object
- #origen_dot_app! ⇒ Object
- #origen_dot_root ⇒ Object
- #origen_dot_root! ⇒ Object
- #read_register(reg, options = {}) ⇒ Object
- #startup(options) ⇒ Object
- #write_register(reg, options = {}) ⇒ Object
Constructor Details
#initialize ⇒ SOC
Returns a new instance of SOC.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/c99/soc.rb', line 7 def initialize add_pin :reset, reset: :drive_hi, name: 'nvm_reset' add_pin :clk, reset: :drive_hi, name: 'nvm_clk' add_pin :clk_mux, reset: :drive_hi, name: 'nvm_clk_mux' add_pins :porta, reset: :drive_lo, size: 8 add_pins :portb, reset: :drive_lo, size: 8, endian: :little add_pin :invoke, reset: :drive_lo, name: 'nvm_invoke' add_pin :done, reset: :expect_hi, name: 'nvm_done' add_pin :fail, reset: :expect_lo, name: 'nvm_fail' add_pin :alvtst, reset: :dont_care, name: 'nvm_alvtst' add_pin :ahvtst, reset: :dont_care, name: 'nvm_ahvtst' add_pin :dtst, reset: :dont_care, name: 'nvm_dtst' add_pin :tclk, reset: :drive_lo add_pin :trst, reset: :drive_hi add_pin_alias :extal, :clk add_pin_alias :extal_mux, :clk_mux add_pin_alias :tms, :done add_pin_alias :tdo, :fail add_pin_alias :tdi, :invoke add_pin_alias :resetb, :ahvtst add_pin_alias :pa5, :porta, pin: 5 add_pin_alias :pa_lower, :porta, pins: [3..0] add_pin_alias :pa_upper, :porta, pins: [7, 6, 5, 4] add_pin_alias :porta_alias, :porta @a = 2 end |
Instance Method Details
#base_address(reg, options = {}) ⇒ Object
62 63 64 65 66 67 68 |
# File 'lib/c99/soc.rb', line 62 def base_address(reg, = {}) if reg.owned_by?(:nvm) 0x4000_0000 else 0 end end |
#has_margin0_bug? ⇒ Boolean
50 51 52 |
# File 'lib/c99/soc.rb', line 50 def has_margin0_bug? false end |
#origen_dot_app ⇒ Object
78 79 80 |
# File 'lib/c99/soc.rb', line 78 def origen_dot_app Origen.app end |
#origen_dot_app! ⇒ Object
82 83 84 |
# File 'lib/c99/soc.rb', line 82 def origen_dot_app! Origen.app! end |
#origen_dot_root ⇒ Object
70 71 72 |
# File 'lib/c99/soc.rb', line 70 def origen_dot_root Origen.root end |
#origen_dot_root! ⇒ Object
74 75 76 |
# File 'lib/c99/soc.rb', line 74 def origen_dot_root! Origen.root! end |
#read_register(reg, options = {}) ⇒ Object
58 59 60 |
# File 'lib/c99/soc.rb', line 58 def read_register(reg, = {}) reg end |
#startup(options) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/c99/soc.rb', line 38 def startup() if [:add_additional_pins] add_pin :late_added_pin, reset: :drive_hi else # Test that rendering some vectors from a template works... if $tester.is_a?(OrigenTesters::J750) $tester.render("#{Origen.root}/pattern/j750/_mode_entry.atp.erb", hold_cycles: 5) end end $tester.set_timeset('nvmbist', 40) if $tester.is_vector_based? end |
#write_register(reg, options = {}) ⇒ Object
54 55 56 |
# File 'lib/c99/soc.rb', line 54 def write_register(reg, = {}) reg end |