Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update supported ruby version #2

Merged
merged 1 commit into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

strategy:
matrix:
ruby: ['3.3', '3.2', '3.1', '3.0']
ruby: ['3.4', '3.3', '3.2', '3.1']
frozen_string_literal: ['yes', 'no']

env:
Expand Down
24 changes: 8 additions & 16 deletions lib/rggen/veryl/bit_field/type/custom.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,47 +5,39 @@
build do
if external_read_data?
input :value_in, {
name: "i_#{full_name}",
width: width, array_size: array_size
name: "i_#{full_name}", width:, array_size:
}
else
output :value_out, {
name: "o_#{full_name}",
width: width, array_size: array_size
name: "o_#{full_name}", width:, array_size:
}
end
if bit_field.hw_write?
input :hw_write_enable, {
name: "i_#{full_name}_hw_write_enable",
width: 1, array_size: array_size
name: "i_#{full_name}_hw_write_enable", width: 1, array_size:
}
input :hw_write_data, {
name: "i_#{full_name}_hw_write_data",
width: width, array_size: array_size
name: "i_#{full_name}_hw_write_data", width:, array_size:
}
end
if bit_field.hw_set?
input :hw_set, {
name: "i_#{full_name}_hw_set",
width: width, array_size: array_size
name: "i_#{full_name}_hw_set", width:, array_size:
}
end
if bit_field.hw_clear?
input :hw_clear, {
name: "i_#{full_name}_hw_clear",
width: width, array_size: array_size
name: "i_#{full_name}_hw_clear", width:, array_size:
}
end
if bit_field.write_trigger?
output :write_trigger, {
name: "o_#{full_name}_write_trigger",
width: 1, array_size: array_size
name: "o_#{full_name}_write_trigger", width: 1, array_size:
}
end
if bit_field.read_trigger?
output :read_trigger, {
name: "o_#{full_name}_read_trigger",
width: 1, array_size: array_size
name: "o_#{full_name}_read_trigger", width: 1, array_size:
}
end
end
Expand Down
9 changes: 3 additions & 6 deletions lib/rggen/veryl/bit_field/type/rc_w0c_w1c_wc_woc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@
veryl do
build do
input :set, {
name: "i_#{full_name}_set",
width: width, array_size: array_size
name: "i_#{full_name}_set", width:, array_size:
}
output :value_out, {
name: "o_#{full_name}",
width: width, array_size: array_size
name: "o_#{full_name}", width:, array_size:
}
if bit_field.reference?
output :value_unmasked, {
name: "o_#{full_name}_unmasked",
width: width, array_size: array_size
name: "o_#{full_name}_unmasked", width:, array_size:
}
end
end
Expand Down
6 changes: 2 additions & 4 deletions lib/rggen/veryl/bit_field/type/ro_rotrg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@
build do
unless bit_field.reference?
input :value_in, {
name: "i_#{full_name}",
width: width, array_size: array_size
name: "i_#{full_name}", width:, array_size:
}
end
if rotrg?
output :read_trigger, {
name: "o_#{full_name}_read_trigger",
width: 1, array_size: array_size
name: "o_#{full_name}_read_trigger", width: 1, array_size:
}
end
end
Expand Down
7 changes: 3 additions & 4 deletions lib/rggen/veryl/bit_field/type/rohw.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@
build do
unless bit_field.reference?
input :valid, {
name: "i_#{full_name}_valid",
width: 1, array_size: array_size
name: "i_#{full_name}_valid", width: 1, array_size:
}
end
input :value_in, {
name: "i_#{full_name}", width: width, array_size: array_size
name: "i_#{full_name}", width:, array_size:
}
output :value_out, {
name: "o_#{full_name}", width: width, array_size: array_size
name: "o_#{full_name}", width:, array_size:
}
end

Expand Down
6 changes: 2 additions & 4 deletions lib/rggen/veryl/bit_field/type/row0trg_row1trg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@
build do
unless bit_field.reference?
input :value_in, {
name: "i_#{full_name}",
width: width, array_size: array_size
name: "i_#{full_name}", width:, array_size:
}
end
output :trigger, {
name: "o_#{full_name}_trigger",
width: width, array_size: array_size
name: "o_#{full_name}_trigger", width:, array_size:
}
end

Expand Down
12 changes: 4 additions & 8 deletions lib/rggen/veryl/bit_field/type/rowo_rowotrg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,19 @@
veryl do
build do
output :value_out, {
name: "o_#{full_name}",
width: width, array_size: array_size
name: "o_#{full_name}", width:, array_size:
}
unless bit_field.reference?
input :value_in, {
name: "i_#{full_name}",
width: width, array_size: array_size
name: "i_#{full_name}", width:, array_size:
}
end
if rowotrg?
output :write_trigger, {
name: "o_#{full_name}_write_trigger",
width: 1, array_size: array_size
name: "o_#{full_name}_write_trigger", width: 1, array_size:
}
output :read_trigger, {
name: "o_#{full_name}_read_trigger",
width: 1, array_size: array_size
name: "o_#{full_name}_read_trigger", width: 1, array_size:
}
end
end
Expand Down
6 changes: 2 additions & 4 deletions lib/rggen/veryl/bit_field/type/rs_w0s_w1s_ws_wos.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
veryl do
build do
input :clear, {
name: "i_#{full_name}_clear",
width: width, array_size: array_size
name: "i_#{full_name}_clear", width:, array_size:
}
output :value_out, {
name: "o_#{full_name}",
width: width, array_size: array_size
name: "o_#{full_name}", width:, array_size:
}
end

Expand Down
9 changes: 3 additions & 6 deletions lib/rggen/veryl/bit_field/type/rw_rwtrg_w1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@
veryl do
build do
output :value_out, {
name: "o_#{full_name}",
width: width, array_size: array_size
name: "o_#{full_name}", width:, array_size:
}
if rwtrg?
output :write_trigger, {
name: "o_#{full_name}_write_trigger",
width: 1, array_size: array_size
name: "o_#{full_name}_write_trigger", width: 1, array_size:
}
output :read_trigger, {
name: "o_#{full_name}_read_trigger",
width: 1, array_size: array_size
name: "o_#{full_name}_read_trigger", width: 1, array_size:
}
end
end
Expand Down
6 changes: 2 additions & 4 deletions lib/rggen/veryl/bit_field/type/rwc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@
build do
unless bit_field.reference?
input :clear, {
name: "i_#{full_name}_clear",
width: 1, array_size: array_size
name: "i_#{full_name}_clear", width: 1, array_size:
}
end
output :value_out, {
name: "o_#{full_name}",
width: width, array_size: array_size
name: "o_#{full_name}", width:, array_size:
}
end

Expand Down
6 changes: 2 additions & 4 deletions lib/rggen/veryl/bit_field/type/rwe_rwl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@
build do
unless bit_field.reference?
input :control, {
name: "i_#{full_name}_#{enable_or_lock}",
width: 1, array_size: array_size
name: "i_#{full_name}_#{enable_or_lock}", width: 1, array_size:
}
end
output :value_out, {
name: "o_#{full_name}",
width: width, array_size: array_size
name: "o_#{full_name}", width:, array_size:
}
end

Expand Down
9 changes: 3 additions & 6 deletions lib/rggen/veryl/bit_field/type/rwhw.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,14 @@
build do
unless bit_field.reference?
input :valid, {
name: "i_#{full_name}_valid",
width: 1, array_size: array_size
name: "i_#{full_name}_valid", width: 1, array_size:
}
end
input :value_in, {
name: "i_#{full_name}",
width: width, array_size: array_size
name: "i_#{full_name}", width:, array_size:
}
output :value_out, {
name: "o_#{full_name}",
width: width, array_size: array_size
name: "o_#{full_name}", width:, array_size:
}
end

Expand Down
6 changes: 2 additions & 4 deletions lib/rggen/veryl/bit_field/type/rws.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@
build do
unless bit_field.reference?
input :set, {
name: "i_#{full_name}_set",
width: 1, array_size: array_size
name: "i_#{full_name}_set", width: 1, array_size:
}
end
output :value_out, {
name: "o_#{full_name}",
width: width, array_size: array_size
name: "o_#{full_name}", width:, array_size:
}
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
veryl do
build do
output :value_out, {
name: "o_#{full_name}",
width: width, array_size: array_size
name: "o_#{full_name}", width:, array_size:
}
end

Expand Down
3 changes: 1 addition & 2 deletions lib/rggen/veryl/bit_field/type/w0t_w1t.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
veryl do
build do
output :value_out, {
name: "o_#{full_name}",
width: width, array_size: array_size
name: "o_#{full_name}", width:, array_size:
}
end

Expand Down
3 changes: 1 addition & 2 deletions lib/rggen/veryl/bit_field/type/w0trg_w1trg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
veryl do
build do
output :trigger, {
name: "o_#{full_name}_trigger",
width: width, array_size: array_size
name: "o_#{full_name}_trigger", width:, array_size:
}
end

Expand Down
6 changes: 2 additions & 4 deletions lib/rggen/veryl/bit_field/type/wo_wo1_wotrg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
veryl do
build do
output :value_out, {
name: "o_#{full_name}",
width: width, array_size: array_size
name: "o_#{full_name}", width:, array_size:
}
if wotrg?
output :write_trigger, {
name: "o_#{full_name}_write_trigger",
width: 1, array_size: array_size
name: "o_#{full_name}_write_trigger", width: 1, array_size:
}
end
end
Expand Down
3 changes: 1 addition & 2 deletions lib/rggen/veryl/bit_field/type/wrc_wrs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
veryl do
build do
output :value_out, {
name: "o_#{full_name}",
width: width, array_size: array_size
name: "o_#{full_name}", width:, array_size:
}
end

Expand Down
26 changes: 13 additions & 13 deletions lib/rggen/veryl/feature.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,31 @@ class Feature < SystemVerilog::Common::Feature

private

def create_if_instance(_, attributes, &block)
InterfaceInstance.new(attributes, &block)
def create_if_instance(_, attributes, &)
InterfaceInstance.new(attributes, &)
end

def create_port(direction, attributes, &block)
def create_port(direction, attributes, &)
attributes =
{ direction: direction }
{ direction: }
.merge(attributes)
DataObject.new(:port, attributes, &block)
DataObject.new(:port, attributes, &)
end

def create_modport(_, attributes, &block)
Modport.new(attributes, &block)
def create_modport(_, attributes, &)
Modport.new(attributes, &)
end

def create_param(_, attributes, &block)
DataObject.new(:param, attributes, &block)
def create_param(_, attributes, &)
DataObject.new(:param, attributes, &)
end

def create_const(_, attributes, &block)
DataObject.new(:const, attributes, &block)
def create_const(_, attributes, &)
DataObject.new(:const, attributes, &)
end

def create_var(_, attributes, &block)
DataObject.new(:var, attributes, &block)
def create_var(_, attributes, &)
DataObject.new(:var, attributes, &)
end

define_entity :input, :create_port, :port, -> { register_block }
Expand Down
2 changes: 1 addition & 1 deletion lib/rggen/veryl/register_block/veryl_top.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

interface :register_if, {
name: 'register_if', interface_type: 'rggen::rggen_register_if',
param_values: param_values, array_size: [total_registers], variables: ['value']
param_values:, array_size: [total_registers], variables: ['value']
}
end

Expand Down
Loading
Loading