Class: DefXp
- Inherits:
-
Object
- Object
- DefXp
- Defined in:
- lib/tdl/elements/track_inf.rb,
lib/tdl/sdlmodule/sdlmodule_varible.rb,
lib/tdl/elements/common_configure_reg.rb
Direct Known Subclasses
Instance Method Summary collapse
- #add_method_to_itgt(stringbanditegration, obj) ⇒ Object
- #bfm_stream(name: "test_axis", clock: nil, reset: nil, dsize: 8, dimension: [], freqM: nil, &block) ⇒ Object
- #clock(name: "", freqM: 100, dsize: 1, &block) ⇒ Object
- #common_cfg_reg_inf(name: "cfg_inf", dsize: 8, asize: 8, dimension: [], &block) ⇒ Object
- #debuglogic(name: "tmp", dsize: 1, port: false, default: nil, msb_high: true, dimension: [], type: "logic", &block) ⇒ Object
-
#initialize(sdlmodule) ⇒ DefXp
constructor
A new instance of DefXp.
- #logic(name: "tmp", dsize: 1, port: false, default: nil, msb_high: true, dimension: [], type: "logic", &block) ⇒ Object
-
#mailbox(name: 'mbox', depth: 100, &block) ⇒ Object
def videoinf(name:“video”,dsize:24,clock:nil,reset:nil,dimension:[],freqM:nil,&block) a = VideoInf.new(name:name,dsize:dsize,clock:clock,reset:reset,port:false,freqM:freqM,dimension:dimension) var_common(a,&block) add_method_to_itgt(name,a) end.
- #parameter(name: "P", value: 100, local: false, type: nil, &block) ⇒ Object
- #reset(name: "", active: "low", dsize: 1, &block) ⇒ Object
- #track_inf(name: "t_inf", clock: nil, reset: nil, dsize: 8, tsize: 1.to_nq, enable: "1'b1".to_nq, dimension: [], &block) ⇒ Object
- #var_common(a, &block) ⇒ Object
Constructor Details
#initialize(sdlmodule) ⇒ DefXp
Returns a new instance of DefXp.
3 4 5 |
# File 'lib/tdl/sdlmodule/sdlmodule_varible.rb', line 3 def initialize(sdlmodule) @sdlmodule = sdlmodule end |
Instance Method Details
#add_method_to_itgt(stringbanditegration, obj) ⇒ Object
11 12 13 |
# File 'lib/tdl/sdlmodule/sdlmodule_varible.rb', line 11 def add_method_to_itgt(stringbanditegration,obj) StringBandItegration.add_method_to_itgt(stringbanditegration,obj) end |
#bfm_stream(name: "test_axis", clock: nil, reset: nil, dsize: 8, dimension: [], freqM: nil, &block) ⇒ Object
90 91 92 93 |
# File 'lib/tdl/sdlmodule/sdlmodule_varible.rb', line 90 def bfm_stream(name:"test_axis",clock:nil,reset:nil,dsize:8,dimension:[],freqM:nil,&block) a = BfmStream.new(name:name,clock:clock,reset:reset,dsize:dsize,dimension:dimension,freqM:freqM) var_common(a,&block) end |
#clock(name: "", freqM: 100, dsize: 1, &block) ⇒ Object
21 22 23 24 25 |
# File 'lib/tdl/sdlmodule/sdlmodule_varible.rb', line 21 def clock(name:"",freqM:100,dsize:1,&block) a = Clock.new(name:name,freqM:freqM,dsize:dsize, belong_to_module: @sdlmodule) var_common(a,&block) add_method_to_itgt(name,a) end |
#common_cfg_reg_inf(name: "cfg_inf", dsize: 8, asize: 8, dimension: [], &block) ⇒ Object
99 100 101 102 103 |
# File 'lib/tdl/elements/common_configure_reg.rb', line 99 def common_cfg_reg_inf(name:"cfg_inf",dsize:8,asize:8,dimension:[],&block) a = CommonCFGReg.new(name:name,dsize:dsize,asize:asize,dimension:dimension) var_common(a,&block) add_method_to_itgt(name,a) end |
#debuglogic(name: "tmp", dsize: 1, port: false, default: nil, msb_high: true, dimension: [], type: "logic", &block) ⇒ Object
84 85 86 87 88 |
# File 'lib/tdl/sdlmodule/sdlmodule_varible.rb', line 84 def debuglogic(name:"tmp",dsize:1,port:false,default:nil,msb_high:true,dimension:[],type:"logic",&block) lg = DebugLogic.new(name:name,dsize:dsize,port:port,default:default,msb_high:msb_high,dimension:dimension,type:type, belong_to_module: @sdlmodule) var_common(lg,&block) add_method_to_itgt(name,lg) end |
#logic(name: "tmp", dsize: 1, port: false, default: nil, msb_high: true, dimension: [], type: "logic", &block) ⇒ Object
15 16 17 18 19 |
# File 'lib/tdl/sdlmodule/sdlmodule_varible.rb', line 15 def logic(name:"tmp",dsize:1,port:false,default:nil,msb_high:true,dimension:[],type:"logic",&block) lg = Logic.new(name:name,dsize:dsize,port:port,default:default,msb_high:msb_high,dimension:dimension,type:type, belong_to_module: @sdlmodule) var_common(lg,&block) add_method_to_itgt(name,lg) end |
#mailbox(name: 'mbox', depth: 100, &block) ⇒ Object
79 80 81 82 |
# File 'lib/tdl/sdlmodule/sdlmodule_varible.rb', line 79 def mailbox(name:'mbox',depth:100,&block) a = MailBox.new(name:name,depth:depth, belong_to_module: @sdlmodule) var_common(a,&block) end |
#parameter(name: "P", value: 100, local: false, type: nil, &block) ⇒ Object
33 34 35 36 37 |
# File 'lib/tdl/sdlmodule/sdlmodule_varible.rb', line 33 def parameter(name:"P",value:100,local:false,type:nil,&block) a = Parameter.new(name:name,value:value,local:local,port:false,show:true,type:type, belong_to_module: @sdlmodule) var_common(a,&block) add_method_to_itgt(name,a) end |
#reset(name: "", active: "low", dsize: 1, &block) ⇒ Object
27 28 29 30 31 |
# File 'lib/tdl/sdlmodule/sdlmodule_varible.rb', line 27 def reset(name:"",active:"low",dsize:1,&block) a = Reset.new(name:name,active:active,dsize:dsize, belong_to_module: @sdlmodule) var_common(a,&block) add_method_to_itgt(name,a) end |
#track_inf(name: "t_inf", clock: nil, reset: nil, dsize: 8, tsize: 1.to_nq, enable: "1'b1".to_nq, dimension: [], &block) ⇒ Object
127 128 129 130 131 |
# File 'lib/tdl/elements/track_inf.rb', line 127 def track_inf(name:"t_inf",clock:nil,reset:nil,dsize:8,tsize:1.to_nq,enable:"1'b1".to_nq,dimension:[],&block) a = TrackInf.new(name:name,clock:clock,reset:reset,dsize:dsize,tsize:tsize,enable:enable,dimension:dimension) var_common(a,&block) add_method_to_itgt(name,a) end |
#var_common(a, &block) ⇒ Object
7 8 9 |
# File 'lib/tdl/sdlmodule/sdlmodule_varible.rb', line 7 def var_common(a,&block) @sdlmodule.var_common(a,&block) end |