Class: ClassHDL::ClearSdlModule
- Defined in:
- lib/tdl/class_hdl/hdl_module_def.rb
Direct Known Subclasses
Constant Summary collapse
- @@id_cnt =
0
Instance Attribute Summary
Attributes inherited from SdlModule
#create_tcl, #dont_gen_sv, #ex_down_code, #ex_param, #ex_port, #ex_up_code, #head_import_packages, #instance_and_children_module, #instanced_and_parent_module, #module_name, #origin_sv, #out_sv_path, #path, #real_sv_path, #target_class, #techbench
Instance Method Summary collapse
-
#initialize(name = nil) ⇒ ClearSdlModule
constructor
A new instance of ClearSdlModule.
- #root_sdlmodule ⇒ Object
Methods inherited from SdlModule
#<<, #>>, #Always, #AlwaysComb, #Always_comb, #Always_ff, #Assign, #CASE, #CASEX, #Clock, #CommonCFGReg, #DEFAULT, #Def, #ELSE, #ELSIF, #FOR, #FOREACH, #IF, #Initial, #Inout, #Input, #Instance, #Itgt_Instance, Main, #NameSpaceAdd, #Output, #Parameter, #Parameters, #Reset, #StateMachine, #TrackInf, #TryDef, #WHEN, #add_children_modules, #add_parent_modules, #add_to_new_module, allmodule_name, #always_ff, #always_sim, #assert, #assert_error, #assert_format_error, #assert_old, #bits, #build_module, #call_instance, call_module, #children_inst_tree, #clog2, #debugLogic, #def_struct, #define_ele, #enum, exist_module?, #function, #gen_sv_module, gen_sv_module, #gen_sv_module_text, #generate, #genvar, #has_inward_inst?, #has_signal?, #implicit_inst_module_method_missing, #initial, #initial_exec, #inout, #input, #instance_draw, #instanced, #inward_inst, #localparam, #logic, #logic_bind_, #macro_add_vcs, #macro_def, #method_missing, #negedge, #output, #parameter, #parents_inst_tree, #port, #posedge, #require_package, #rubyOP, #same_clock_domain, #show_ports, #signal, #top_module_ref?, #top_tb_ref?, #try_call_ele, #urandom_range, #var_common, #vars_define_inst, #vars_exec_inst, #vcs_string, #verify
Constructor Details
#initialize(name = nil) ⇒ ClearSdlModule
Returns a new instance of ClearSdlModule.
394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 |
# File 'lib/tdl/class_hdl/hdl_module_def.rb', line 394 def initialize(name=nil) ClassHDL::AssignDefOpertor.with_rollback_opertors(:old) do @@allmodule << self @module_name = name || "clear_board_sdlmodule_#{@@id_cnt}" # @real_sv_path = File.join(@out_sv_path,"#{@module_name}.sv") if @out_sv_path @dont_gen_sv = true @port_clocks = Hash.new @port_resets = Hash.new @port_params = Hash.new @port_logics = Hash.new @port_datainfs = Hash.new @port_datainf_c_s = Hash.new @port_videoinfs = Hash.new @port_axisinfs = Hash.new @port_axi4infs = Hash.new @port_axilinfs = Hash.new # @techbench = TechBench.new @sub_instanced = [] ## -------- @@ele_array.each do |e| head_str = "@#{e.to_s}" self.instance_variable_set("#{head_str}_collect",[]) self.instance_variable_set("#{head_str}_inst",[]) self.instance_variable_set("#{head_str}_draw",[]) self.instance_variable_set("#{head_str}_pre_inst_stack",[]) self.instance_variable_set("#{head_str}_post_inst_stack",[]) # tmp = e.new(name:"#{e.to_s}_NC") # tmp.ghost = true # self.instance_variable_set("#{head_str}_NC",tmp) end create_ghost @@id_cnt += 1 @instanced_and_parent_module ||= Hash.new @instance_and_children_module ||= Hash.new end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class SdlModule
Instance Method Details
#root_sdlmodule ⇒ Object
433 434 435 436 437 438 439 440 441 442 443 |
# File 'lib/tdl/class_hdl/hdl_module_def.rb', line 433 def root_sdlmodule unless @belong_to_module return nil else if @belong_to_module.is_a?(SdlModule) && !@belong_to_module.is_a?(ClearSdlModule) return @belong_to_module else return @belong_to_module.root_sdlmodule end end end |