rggen-verilog 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eea0415f0d8ad111af37525833522c9f542d5815e56d954aa69e22f973096919
4
- data.tar.gz: cba5ff6f30efa182b035d62698d8017f3bda815e5eca1b2e5cbe093ba525a4b3
3
+ metadata.gz: 7071aa165eea26e8fc35de9ce6fd6a026aa5def4b29075d709f2d3db6ad74f89
4
+ data.tar.gz: e805e0399138162446f3e5d3ea5b49a95b15167792acf650f142a14d9f3f53a3
5
5
  SHA512:
6
- metadata.gz: 687b5e2c1d2cdcf72bf6808c4ffcbf8fcc730fc6efd3ed47383650564be7809bd049f2c192b3e407f6f9bf020514046acd0a8365a6d6141c2844b24fbd4de0b7
7
- data.tar.gz: 6dcf31105b3e66e3d570e040457262e832d50e635f9ab1fdedf967ac03531655537561b4d8554fd7e36fe14c0037586e9068fa93b035fedf94e35d197d436a99
6
+ metadata.gz: fc56d7ab4db650083dd5f7269e29c0341095a37bf1230b3f0d469ae78eaee6f8422fe868240017fa327502d1f6e497da4aec643c5e10a9d1dceaa37e0f5dbf53
7
+ data.tar.gz: e285f84c954580f58eabed0e40a709d9bf1f76e3b2f96cafc8588f0807aecd379d983e621eb9e21c80a8b8eaaf60eaaa79998aa7d3cf2b783ba8c2c28981c84f
@@ -18,7 +18,7 @@ rggen_bit_field #(
18
18
  .i_hw_set (<%= fill_0(width) %>),
19
19
  .i_hw_clear (<%= clear[loop_variables] %>),
20
20
  .i_value (<%= fill_0(width) %>),
21
- .i_mask (<%= mask %>),
21
+ .i_mask (<%= fill_1(width) %>),
22
22
  .o_value (<%= value_out[loop_variables] %>),
23
23
  .o_value_unmasked ()
24
24
  );
@@ -88,7 +88,20 @@ RgGen.define_simple_feature(:register_block, :verilog_top) do
88
88
  end
89
89
 
90
90
  def ports
91
- register_block.declarations[:port]
91
+ register_block
92
+ .declarations[:port]
93
+ .yield_self(&method(:sort_port_declarations))
94
+ end
95
+
96
+ def sort_port_declarations(declarations)
97
+ declarations
98
+ .partition(&method(:clock_or_reset?))
99
+ .flatten
100
+ end
101
+
102
+ def clock_or_reset?(declaration)
103
+ [clock.to_s, reset.to_s]
104
+ .any? { |port_name| declaration.include?(port_name) }
92
105
  end
93
106
 
94
107
  def variables
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'rggen/verilog'
4
- require 'rggen/systemverilog/rtl/setup'
5
4
 
6
5
  RgGen.register_plugin RgGen::Verilog do |builder|
6
+ builder.load_plugin 'rggen/systemverilog/rtl/setup'
7
7
  builder.enable :register_block, [:verilog_top]
8
8
  builder.enable :register_file, [:verilog_top]
9
9
  builder.enable :register, [:verilog_top]
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RgGen
4
4
  module Verilog
5
- VERSION = '0.3.0'
5
+ VERSION = '0.3.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rggen-verilog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taichi Ishitani
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-28 00:00:00.000000000 Z
11
+ date: 2021-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rggen-systemverilog
@@ -123,5 +123,5 @@ requirements: []
123
123
  rubygems_version: 3.2.3
124
124
  signing_key:
125
125
  specification_version: 4
126
- summary: rggen-verilog-0.3.0
126
+ summary: rggen-verilog-0.3.1
127
127
  test_files: []