Class: DebugLogic

Inherits:
Logic show all
Defined in:
lib/tdl/elements/logic.rb

Constant Summary

Constants inherited from Logic

Logic::INOUT, Logic::INPUT, Logic::OP_SYMBOLS, Logic::OUTPUT, Logic::Synth_REP

Constants included from ClassHDL::AssignDefOpertor

ClassHDL::AssignDefOpertor::OP_SYMBOLS

Instance Attribute Summary

Attributes inherited from Logic

#clock, #dimension, #dsize, #ghost, #id, #name, #port, #reset, #type

Attributes inherited from BaseElm

#belong_to_module, #name

Instance Method Summary collapse

Methods inherited from Logic

#Initial, #[], #[]=, #active, #broaden_and_cross_clk, #copy, #cross_clock, #destruct_to, exp_element, #exp_element, #falling, #force_nege_index, #init_assign, #init_exec, #initialize, #inst_port, #latency, #merge_from, parse_ports, #port_length, #raising, #repeat, #signal, #to_s

Methods included from ClassHDL::AssignDefOpertor

curr_assign_block, curr_assign_block=, curr_assign_block_stack, curr_opertor_stack, included, init_op_methods, use_new_yield_opertors, use_old_cond_opertors, with_new_assign_block, with_new_opertor, with_normal_opertor, with_rollback_opertors

Methods included from ClassHDL::RandomNum

#precent_false, #precent_true

Methods included from BaseModule

#length, #to_s

Methods inherited from SignalElm

#[], inherited, parse_ports, subclass

Methods inherited from BaseElm

#matrix, #name_copy, #path_refs, recfg_nc, #s, #signal

Methods included from TdlSpace::ExCreateTP

#create_tp, #root_ref

Constructor Details

This class inherits a constructor from Logic

Instance Method Details

#instObject



337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
# File 'lib/tdl/elements/logic.rb', line 337

def inst

    lname = @name.to_s

    unless @ghost
        if dsize.eql?(1)
            str = "(* MARK_DEBUG=\"true\" *)(* dont_touch=\"true\" *)#{@type} #{lname}#{@default ? " = #{align_signal(@default)};" : ";"}"
        else
            if (@dsize.is_a? Numeric) && @dsize < 0
                str = "(* MARK_DEBUG=\"true\" *)(* dont_touch=\"true\" *)#{@type} [0:#{(-@dsize-1)}] #{lname}#{array_inst} #{@default ? " = #{align_signal(@default)};" : ";"}"
            else
                str = "(* MARK_DEBUG=\"true\" *)(* dont_touch=\"true\" *)#{@type} [#{(@dsize-1)}:0]  #{lname}#{array_inst} #{@default ? " = #{align_signal(@default)};" : ";"}"
            end
        end
    else
        str = ""
    end
    str
end