rggen 0.12.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -2
  3. data/lib/rggen.rb +0 -1
  4. data/lib/rggen/default.rb +7 -0
  5. data/lib/rggen/default_setup_file.rb +1 -2
  6. data/lib/rggen/version.rb +1 -3
  7. metadata +25 -81
  8. data/lib/rggen/built_in.rb +0 -57
  9. data/lib/rggen/built_in/bit_field/bit_assignment.rb +0 -114
  10. data/lib/rggen/built_in/bit_field/comment.rb +0 -18
  11. data/lib/rggen/built_in/bit_field/initial_value.rb +0 -75
  12. data/lib/rggen/built_in/bit_field/name.rb +0 -41
  13. data/lib/rggen/built_in/bit_field/reference.rb +0 -139
  14. data/lib/rggen/built_in/bit_field/sv_rtl_top.rb +0 -89
  15. data/lib/rggen/built_in/bit_field/type.rb +0 -245
  16. data/lib/rggen/built_in/bit_field/type/rc_w0c_w1c.erb +0 -15
  17. data/lib/rggen/built_in/bit_field/type/rc_w0c_w1c.rb +0 -59
  18. data/lib/rggen/built_in/bit_field/type/reserved.erb +0 -3
  19. data/lib/rggen/built_in/bit_field/type/reserved.rb +0 -16
  20. data/lib/rggen/built_in/bit_field/type/ro.erb +0 -6
  21. data/lib/rggen/built_in/bit_field/type/ro.rb +0 -31
  22. data/lib/rggen/built_in/bit_field/type/rof.erb +0 -6
  23. data/lib/rggen/built_in/bit_field/type/rof.rb +0 -17
  24. data/lib/rggen/built_in/bit_field/type/rs_w0s_w1s.erb +0 -13
  25. data/lib/rggen/built_in/bit_field/type/rs_w0s_w1s.rb +0 -46
  26. data/lib/rggen/built_in/bit_field/type/rw_wo.erb +0 -9
  27. data/lib/rggen/built_in/bit_field/type/rw_wo.rb +0 -30
  28. data/lib/rggen/built_in/bit_field/type/rwc_rwe_rwl.erb +0 -16
  29. data/lib/rggen/built_in/bit_field/type/rwc_rwe_rwl.rb +0 -92
  30. data/lib/rggen/built_in/bit_field/type/w0trg_w1trg.erb +0 -9
  31. data/lib/rggen/built_in/bit_field/type/w0trg_w1trg.rb +0 -29
  32. data/lib/rggen/built_in/global/address_width.rb +0 -34
  33. data/lib/rggen/built_in/global/array_port_format.rb +0 -19
  34. data/lib/rggen/built_in/global/bus_width.rb +0 -35
  35. data/lib/rggen/built_in/global/fold_sv_interface_port.rb +0 -24
  36. data/lib/rggen/built_in/register/markdown.erb +0 -11
  37. data/lib/rggen/built_in/register/markdown.rb +0 -26
  38. data/lib/rggen/built_in/register/name.rb +0 -36
  39. data/lib/rggen/built_in/register/offset_address.rb +0 -106
  40. data/lib/rggen/built_in/register/size.rb +0 -95
  41. data/lib/rggen/built_in/register/sv_rtl_top.rb +0 -82
  42. data/lib/rggen/built_in/register/type.rb +0 -344
  43. data/lib/rggen/built_in/register/type/default_sv_ral.erb +0 -8
  44. data/lib/rggen/built_in/register/type/default_sv_rtl.erb +0 -15
  45. data/lib/rggen/built_in/register/type/external.erb +0 -11
  46. data/lib/rggen/built_in/register/type/external.rb +0 -128
  47. data/lib/rggen/built_in/register/type/indirect.rb +0 -327
  48. data/lib/rggen/built_in/register/type/indirect_sv_ral.erb +0 -13
  49. data/lib/rggen/built_in/register/type/indirect_sv_rtl.erb +0 -17
  50. data/lib/rggen/built_in/register_block/byte_size.rb +0 -61
  51. data/lib/rggen/built_in/register_block/markdown.erb +0 -8
  52. data/lib/rggen/built_in/register_block/markdown.rb +0 -36
  53. data/lib/rggen/built_in/register_block/name.rb +0 -38
  54. data/lib/rggen/built_in/register_block/protocol.rb +0 -100
  55. data/lib/rggen/built_in/register_block/protocol/apb.erb +0 -10
  56. data/lib/rggen/built_in/register_block/protocol/apb.rb +0 -89
  57. data/lib/rggen/built_in/register_block/protocol/axi4lite.erb +0 -11
  58. data/lib/rggen/built_in/register_block/protocol/axi4lite.rb +0 -125
  59. data/lib/rggen/built_in/register_block/sv_ral_block_model.erb +0 -11
  60. data/lib/rggen/built_in/register_block/sv_ral_package.rb +0 -65
  61. data/lib/rggen/built_in/register_block/sv_rtl_macros.erb +0 -9
  62. data/lib/rggen/built_in/register_block/sv_rtl_top.rb +0 -86
  63. data/lib/rggen/built_in/version.rb +0 -7
  64. data/lib/rggen/setup/default.rb +0 -30
  65. data/sample/block_0.md +0 -155
  66. data/sample/block_0.rb +0 -90
  67. data/sample/block_0.sv +0 -678
  68. data/sample/block_0.xlsx +0 -0
  69. data/sample/block_0.yml +0 -99
  70. data/sample/block_0_ral_pkg.sv +0 -184
  71. data/sample/block_1.md +0 -39
  72. data/sample/block_1.rb +0 -22
  73. data/sample/block_1.sv +0 -136
  74. data/sample/block_1.xlsx +0 -0
  75. data/sample/block_1.yml +0 -26
  76. data/sample/block_1_ral_pkg.sv +0 -68
  77. data/sample/config.json +0 -5
  78. data/sample/config.yml +0 -3
Binary file
@@ -1,26 +0,0 @@
1
- register_blocks: [
2
- {
3
- name: block_1,
4
- byte_size: 128,
5
- registers: [
6
- {
7
- name: 'register_0',
8
- offset_address: 0x00,
9
- size: [2, 4],
10
- bit_fields: [
11
- { name: bit_field_0, bit_assignment: { lsb: 0, width: 8, sequence_size: 4, step: 16 }, type: rw, initial_value: 0x00 },
12
- { name: bit_field_1, bit_assignment: { lsb: 8, width: 8, sequence_size: 4, step: 16 }, type: ro, reference: register_1.bit_field_1 }
13
- ]
14
- },
15
- {
16
- name: 'register_1',
17
- offset_address: 0x40,
18
- size: [2, 4],
19
- bit_fields: [
20
- { name: bit_field_0, bit_assignment: { lsb: 0, width: 8, sequence_size: 4, step: 16 }, type: ro, reference: register_0.bit_field_0 },
21
- { name: bit_field_1, bit_assignment: { lsb: 8, width: 8, sequence_size: 4, step: 16 }, type: rw, initial_value: 0x00 }
22
- ]
23
- }
24
- ]
25
- }
26
- ]
@@ -1,68 +0,0 @@
1
- package block_1_ral_pkg;
2
- import uvm_pkg::*;
3
- import rggen_ral_pkg::*;
4
- `include "uvm_macros.svh"
5
- `include "rggen_ral_macros.svh"
6
- class register_0_reg_model extends rggen_ral_reg;
7
- rand rggen_ral_field bit_field_0[4];
8
- rand rggen_ral_field bit_field_1[4];
9
- function new(string name);
10
- super.new(name, 64, 0);
11
- endfunction
12
- function void build();
13
- `rggen_ral_create_field_model(bit_field_0[0], 0, 8, RW, 0, 8'h00, 1)
14
- `rggen_ral_create_field_model(bit_field_0[1], 16, 8, RW, 0, 8'h00, 1)
15
- `rggen_ral_create_field_model(bit_field_0[2], 32, 8, RW, 0, 8'h00, 1)
16
- `rggen_ral_create_field_model(bit_field_0[3], 48, 8, RW, 0, 8'h00, 1)
17
- `rggen_ral_create_field_model(bit_field_1[0], 8, 8, RO, 1, 8'h00, 0)
18
- `rggen_ral_create_field_model(bit_field_1[1], 24, 8, RO, 1, 8'h00, 0)
19
- `rggen_ral_create_field_model(bit_field_1[2], 40, 8, RO, 1, 8'h00, 0)
20
- `rggen_ral_create_field_model(bit_field_1[3], 56, 8, RO, 1, 8'h00, 0)
21
- endfunction
22
- endclass
23
- class register_1_reg_model extends rggen_ral_reg;
24
- rand rggen_ral_field bit_field_0[4];
25
- rand rggen_ral_field bit_field_1[4];
26
- function new(string name);
27
- super.new(name, 64, 0);
28
- endfunction
29
- function void build();
30
- `rggen_ral_create_field_model(bit_field_0[0], 0, 8, RO, 1, 8'h00, 0)
31
- `rggen_ral_create_field_model(bit_field_0[1], 16, 8, RO, 1, 8'h00, 0)
32
- `rggen_ral_create_field_model(bit_field_0[2], 32, 8, RO, 1, 8'h00, 0)
33
- `rggen_ral_create_field_model(bit_field_0[3], 48, 8, RO, 1, 8'h00, 0)
34
- `rggen_ral_create_field_model(bit_field_1[0], 8, 8, RW, 0, 8'h00, 1)
35
- `rggen_ral_create_field_model(bit_field_1[1], 24, 8, RW, 0, 8'h00, 1)
36
- `rggen_ral_create_field_model(bit_field_1[2], 40, 8, RW, 0, 8'h00, 1)
37
- `rggen_ral_create_field_model(bit_field_1[3], 56, 8, RW, 0, 8'h00, 1)
38
- endfunction
39
- endclass
40
- class block_1_block_model extends rggen_ral_block;
41
- rand register_0_reg_model register_0[2][4];
42
- rand register_1_reg_model register_1[2][4];
43
- function new(string name);
44
- super.new(name);
45
- endfunction
46
- function void build();
47
- `rggen_ral_create_reg_model(register_0[0][0], '{0, 0}, 7'h00, RW, 0, g_register_0.g[0].g[0].u_register)
48
- `rggen_ral_create_reg_model(register_0[0][1], '{0, 1}, 7'h08, RW, 0, g_register_0.g[0].g[1].u_register)
49
- `rggen_ral_create_reg_model(register_0[0][2], '{0, 2}, 7'h10, RW, 0, g_register_0.g[0].g[2].u_register)
50
- `rggen_ral_create_reg_model(register_0[0][3], '{0, 3}, 7'h18, RW, 0, g_register_0.g[0].g[3].u_register)
51
- `rggen_ral_create_reg_model(register_0[1][0], '{1, 0}, 7'h20, RW, 0, g_register_0.g[1].g[0].u_register)
52
- `rggen_ral_create_reg_model(register_0[1][1], '{1, 1}, 7'h28, RW, 0, g_register_0.g[1].g[1].u_register)
53
- `rggen_ral_create_reg_model(register_0[1][2], '{1, 2}, 7'h30, RW, 0, g_register_0.g[1].g[2].u_register)
54
- `rggen_ral_create_reg_model(register_0[1][3], '{1, 3}, 7'h38, RW, 0, g_register_0.g[1].g[3].u_register)
55
- `rggen_ral_create_reg_model(register_1[0][0], '{0, 0}, 7'h40, RW, 0, g_register_1.g[0].g[0].u_register)
56
- `rggen_ral_create_reg_model(register_1[0][1], '{0, 1}, 7'h48, RW, 0, g_register_1.g[0].g[1].u_register)
57
- `rggen_ral_create_reg_model(register_1[0][2], '{0, 2}, 7'h50, RW, 0, g_register_1.g[0].g[2].u_register)
58
- `rggen_ral_create_reg_model(register_1[0][3], '{0, 3}, 7'h58, RW, 0, g_register_1.g[0].g[3].u_register)
59
- `rggen_ral_create_reg_model(register_1[1][0], '{1, 0}, 7'h60, RW, 0, g_register_1.g[1].g[0].u_register)
60
- `rggen_ral_create_reg_model(register_1[1][1], '{1, 1}, 7'h68, RW, 0, g_register_1.g[1].g[1].u_register)
61
- `rggen_ral_create_reg_model(register_1[1][2], '{1, 2}, 7'h70, RW, 0, g_register_1.g[1].g[2].u_register)
62
- `rggen_ral_create_reg_model(register_1[1][3], '{1, 3}, 7'h78, RW, 0, g_register_1.g[1].g[3].u_register)
63
- endfunction
64
- function uvm_reg_map create_default_map();
65
- return create_map("default_map", 0, 4, UVM_LITTLE_ENDIAN, 1);
66
- endfunction
67
- endclass
68
- endpackage
@@ -1,5 +0,0 @@
1
- {
2
- "bus_width": 32,
3
- "address_width": 16,
4
- "protocol": "apb"
5
- }
@@ -1,3 +0,0 @@
1
- bus_width: 32
2
- address_width: 16
3
- protocol: apb