class HDLRuby::High::Std::PipelineT::PipeSignal
The pipeline signal generator class
Attributes
name[R]
signal[R]
type[R]
Public Class Methods
new(name,scope)
click to toggle source
Create a new pipeline signal generator with name
whose resulting signal is to be added to scope
.
# File lib/HDLRuby/std/pipeline.rb, line 30 def initialize(name,scope) @name = name.to_sym @scope = scope @type = nil @signal = nil end
Public Instance Methods
<=(expr)
click to toggle source
Assigns expr
to the signal. Is the signal is not generated yet, generate it.
# File lib/HDLRuby/std/pipeline.rb, line 39 def <=(expr) # Ensures expr is an expression expr = expr.to_expr # Generate the signal if not existant # puts "@scope=#{@scope}" puts "For @name=#{@name} @signal=#{@signal}" @signal = @scope.make_inners(expr.type,@name) unless @signal # Performs the assignment. @signal <= expr end
to_expr()
click to toggle source
Converts to an expression.
# File lib/HDLRuby/std/pipeline.rb, line 51 def to_expr return @signal.to_expr end
to_ref()
click to toggle source
Converts to a reference.
# File lib/HDLRuby/std/pipeline.rb, line 56 def to_ref return @signal.to_ref end