Class: OrigenSim::Simulator::SnapshotDetails
- Inherits:
-
UserDetails
- Object
- UserDetails
- OrigenSim::Simulator::SnapshotDetails
- Defined in:
- lib/origen_sim/simulator/snapshot_details.rb
Overview
The SnapshotDetails and UserDetails share a lot in common, with the SnapshotDetails containing a bit of extra stuff.
Constant Summary
Constants inherited from UserDetails
Instance Attribute Summary collapse
-
#_user_details ⇒ Object
readonly
Returns the value of attribute _user_details.
Attributes inherited from UserDetails
Instance Method Summary collapse
- #_missing_detail_message(d) ⇒ Object
- #detail_to_net(d) ⇒ Object
-
#initialize(simulator:, cache: true) ⇒ SnapshotDetails
constructor
A new instance of SnapshotDetails.
- #user_detail(d) ⇒ Object
-
#user_details(d = nil) ⇒ Object
The user details interface is the same as the snapshot_details ### just on the snapshot_details itself ###.
Methods inherited from UserDetails
#[], #available_details, #detail_names_net, #fetch, #method_missing, #to_ary
Constructor Details
#initialize(simulator:, cache: true) ⇒ SnapshotDetails
Returns a new instance of SnapshotDetails.
10 11 12 13 14 15 |
# File 'lib/origen_sim/simulator/snapshot_details.rb', line 10 def initialize(simulator:, cache: true) # @fetch_error_message = "OrigenSim was unable to find net #{detail_names_net} in the snapshot! Unable to retrieve snapshot details!" super(simulator: simulator, cache: cache) @_user_details = UserDetails.new(simulator: simulator, cache: cache) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class OrigenSim::Simulator::UserDetails
Instance Attribute Details
#_user_details ⇒ Object (readonly)
Returns the value of attribute _user_details.
8 9 10 |
# File 'lib/origen_sim/simulator/snapshot_details.rb', line 8 def _user_details @_user_details end |
Instance Method Details
#_missing_detail_message(d) ⇒ Object
21 22 23 |
# File 'lib/origen_sim/simulator/snapshot_details.rb', line 21 def (d) "Detail '#{d}' is not an available snapshot detail name!" end |
#detail_to_net(d) ⇒ Object
17 18 19 |
# File 'lib/origen_sim/simulator/snapshot_details.rb', line 17 def detail_to_net(d) "#{@simulator.testbench_top}.debug.snapshot_details.#{d}" end |
#user_detail(d) ⇒ Object
36 37 38 |
# File 'lib/origen_sim/simulator/snapshot_details.rb', line 36 def user_detail(d) user_details(d) end |
#user_details(d = nil) ⇒ Object
The user details interface is the same as the snapshot_details ### just on the snapshot_details itself ###
28 29 30 31 32 33 34 |
# File 'lib/origen_sim/simulator/snapshot_details.rb', line 28 def user_details(d = nil) if d _user_details[d] else _user_details end end |