From 2e7b759832c849042b876418ad7454ebf2d428b5 Mon Sep 17 00:00:00 2001 From: Stefan Lippuner <3071885+stefanlippuner@users.noreply.github.com> Date: Thu, 23 May 2024 17:51:23 +0200 Subject: [PATCH] Testfiles - Update with same label and stdint C changes --- testfiles/bug-gen-c-02/fip_urv_regs.h | 3 +++ testfiles/bug-gen-c-02/mbox_regs.h | 3 +++ testfiles/bug-same-label/same_label-consts.h | 13 +++++++++++++ testfiles/bug-same-label/same_label-consts.sv | 15 +++++++++++++++ testfiles/bug-same-label/same_label-consts.v | 13 +++++++++++++ testfiles/bug-same-label/same_label-consts.vhdl | 15 +++++++++++++++ .../bug-same-label/same_label-consts.vhdl-ohwr | 15 +++++++++++++++ testfiles/bug-same-label/same_label.h | 4 +++- testfiles/issue103/top.h | 3 +++ testfiles/issue67/repeatInRepeat.h | 3 +++ testfiles/issue67/repeatInRepeatC.h | 3 +++ 11 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 testfiles/bug-same-label/same_label-consts.h create mode 100644 testfiles/bug-same-label/same_label-consts.sv create mode 100644 testfiles/bug-same-label/same_label-consts.v create mode 100644 testfiles/bug-same-label/same_label-consts.vhdl create mode 100644 testfiles/bug-same-label/same_label-consts.vhdl-ohwr diff --git a/testfiles/bug-gen-c-02/fip_urv_regs.h b/testfiles/bug-gen-c-02/fip_urv_regs.h index 3d0ce45f..d5c5731c 100644 --- a/testfiles/bug-gen-c-02/fip_urv_regs.h +++ b/testfiles/bug-gen-c-02/fip_urv_regs.h @@ -1,6 +1,9 @@ #ifndef __CHEBY__FIP_URV_REGS__H__ #define __CHEBY__FIP_URV_REGS__H__ +#include + + #include "mbox_regs.h" #define FIP_URV_REGS_SIZE 16384 /* 0x4000 = 16KB */ diff --git a/testfiles/bug-gen-c-02/mbox_regs.h b/testfiles/bug-gen-c-02/mbox_regs.h index 642ffebd..78e73ca1 100644 --- a/testfiles/bug-gen-c-02/mbox_regs.h +++ b/testfiles/bug-gen-c-02/mbox_regs.h @@ -1,5 +1,8 @@ #ifndef __CHEBY__MBOX_REGS__H__ #define __CHEBY__MBOX_REGS__H__ + +#include + #define MBOX_REGS_SIZE 12 /* 0xc */ /* Mailbox to the fip urv */ diff --git a/testfiles/bug-same-label/same_label-consts.h b/testfiles/bug-same-label/same_label-consts.h new file mode 100644 index 00000000..2e8d4f30 --- /dev/null +++ b/testfiles/bug-same-label/same_label-consts.h @@ -0,0 +1,13 @@ +#define SAME_LABEL_REG_SIZE 16 +#define ADDR_SAME_LABEL_REG_NO_FIELDS 0x0UL +#define SAME_LABEL_REG_NO_FIELDS_PRESET 0x20UL +#define ADDR_SAME_LABEL_REG_SAME_NAME 0x4UL +#define SAME_LABEL_REG_SAME_NAME_OFFSET 0 +#define SAME_LABEL_REG_SAME_NAME 0x1UL +#define ADDR_SAME_LABEL_REG_SAME_NAME_MULTI 0x8UL +#define SAME_LABEL_REG_SAME_NAME_MULTI_OFFSET 0 +#define SAME_LABEL_REG_SAME_NAME_MULTI 0xfffUL +#define ADDR_SAME_LABEL_REG_NOT_SAME_REG 0xcUL +#define ADDR_SAME_LABEL_REG_NOT_SAME 0xcUL +#define SAME_LABEL_REG_NOT_SAME_OFFSET 0 +#define SAME_LABEL_REG_NOT_SAME 0x1UL diff --git a/testfiles/bug-same-label/same_label-consts.sv b/testfiles/bug-same-label/same_label-consts.sv new file mode 100644 index 00000000..754477e9 --- /dev/null +++ b/testfiles/bug-same-label/same_label-consts.sv @@ -0,0 +1,15 @@ +package same_label_reg_Consts; + localparam SAME_LABEL_REG_SIZE = 16; + localparam ADDR_SAME_LABEL_REG_NO_FIELDS = 'h0; + localparam SAME_LABEL_REG_NO_FIELDS_PRESET = 8'h20; + localparam ADDR_SAME_LABEL_REG_SAME_NAME = 'h4; + localparam SAME_LABEL_REG_SAME_NAME_OFFSET = 0; + localparam SAME_LABEL_REG_SAME_NAME = 32'h1; + localparam ADDR_SAME_LABEL_REG_SAME_NAME_MULTI = 'h8; + localparam SAME_LABEL_REG_SAME_NAME_MULTI_OFFSET = 0; + localparam SAME_LABEL_REG_SAME_NAME_MULTI = 32'hfff; + localparam ADDR_SAME_LABEL_REG_NOT_SAME_REG = 'hc; + localparam ADDR_SAME_LABEL_REG_NOT_SAME = 'hc; + localparam SAME_LABEL_REG_NOT_SAME_OFFSET = 0; + localparam SAME_LABEL_REG_NOT_SAME = 32'h1; +endpackage diff --git a/testfiles/bug-same-label/same_label-consts.v b/testfiles/bug-same-label/same_label-consts.v new file mode 100644 index 00000000..2d197ffc --- /dev/null +++ b/testfiles/bug-same-label/same_label-consts.v @@ -0,0 +1,13 @@ +`define SAME_LABEL_REG_SIZE 16 +`define ADDR_SAME_LABEL_REG_NO_FIELDS 'h0 +`define SAME_LABEL_REG_NO_FIELDS_PRESET 'h20 +`define ADDR_SAME_LABEL_REG_SAME_NAME 'h4 +`define SAME_LABEL_REG_SAME_NAME_OFFSET 0 +`define SAME_LABEL_REG_SAME_NAME 'h1 +`define ADDR_SAME_LABEL_REG_SAME_NAME_MULTI 'h8 +`define SAME_LABEL_REG_SAME_NAME_MULTI_OFFSET 0 +`define SAME_LABEL_REG_SAME_NAME_MULTI 'hfff +`define ADDR_SAME_LABEL_REG_NOT_SAME_REG 'hc +`define ADDR_SAME_LABEL_REG_NOT_SAME 'hc +`define SAME_LABEL_REG_NOT_SAME_OFFSET 0 +`define SAME_LABEL_REG_NOT_SAME 'h1 diff --git a/testfiles/bug-same-label/same_label-consts.vhdl b/testfiles/bug-same-label/same_label-consts.vhdl new file mode 100644 index 00000000..e2ebeed7 --- /dev/null +++ b/testfiles/bug-same-label/same_label-consts.vhdl @@ -0,0 +1,15 @@ +library ieee; +use ieee.std_logic_1164.all; + +package same_label_reg_Consts is + constant SAME_LABEL_REG_SIZE : Natural := 16; + constant ADDR_SAME_LABEL_REG_NO_FIELDS : Natural := 16#0#; + constant SAME_LABEL_REG_NO_FIELDS_PRESET : std_logic_vector(8-1 downto 0) := x"20"; + constant ADDR_SAME_LABEL_REG_SAME_NAME : Natural := 16#4#; + constant SAME_LABEL_REG_SAME_NAME_OFFSET : Natural := 0; + constant ADDR_SAME_LABEL_REG_SAME_NAME_MULTI : Natural := 16#8#; + constant SAME_LABEL_REG_SAME_NAME_MULTI_OFFSET : Natural := 0; + constant ADDR_SAME_LABEL_REG_NOT_SAME_REG : Natural := 16#c#; + constant ADDR_SAME_LABEL_REG_NOT_SAME : Natural := 16#c#; + constant SAME_LABEL_REG_NOT_SAME_OFFSET : Natural := 0; +end package same_label_reg_Consts; diff --git a/testfiles/bug-same-label/same_label-consts.vhdl-ohwr b/testfiles/bug-same-label/same_label-consts.vhdl-ohwr new file mode 100644 index 00000000..9809a8e6 --- /dev/null +++ b/testfiles/bug-same-label/same_label-consts.vhdl-ohwr @@ -0,0 +1,15 @@ +library ieee; +use ieee.std_logic_1164.all; + +package same_label_reg_consts_pkg is + constant c_SAME_LABEL_REG_SIZE : Natural := 16; + constant c_SAME_LABEL_REG_NO_FIELDS_ADDR : Natural := 16#0#; + constant c_SAME_LABEL_REG_NO_FIELDS_PRESET : std_logic_vector(8-1 downto 0) := x"20"; + constant c_SAME_LABEL_REG_SAME_NAME_ADDR : Natural := 16#4#; + constant c_SAME_LABEL_REG_SAME_NAME_OFFSET : Natural := 0; + constant c_SAME_LABEL_REG_SAME_NAME_MULTI_ADDR : Natural := 16#8#; + constant c_SAME_LABEL_REG_SAME_NAME_MULTI_OFFSET : Natural := 0; + constant c_SAME_LABEL_REG_NOT_SAME_REG_ADDR : Natural := 16#c#; + constant c_ADDR_SAME_LABEL_REG_NOT_SAME : Natural := 16#c#; + constant c_SAME_LABEL_REG_NOT_SAME_OFFSET : Natural := 0; +end package same_label_reg_consts_pkg; diff --git a/testfiles/bug-same-label/same_label.h b/testfiles/bug-same-label/same_label.h index fa0f1c96..c095239b 100644 --- a/testfiles/bug-same-label/same_label.h +++ b/testfiles/bug-same-label/same_label.h @@ -1,5 +1,8 @@ #ifndef __CHEBY__SAME_LABEL_REG__H__ #define __CHEBY__SAME_LABEL_REG__H__ + +#include + #define SAME_LABEL_REG_SIZE 16 /* 0x10 */ /* Register without fields. */ @@ -8,7 +11,6 @@ /* Register with same-name field. */ #define SAME_LABEL_REG_SAME_NAME 0x4UL -#define SAME_LABEL_REG_SAME_NAME 0x1UL /* Register with multi-bit same-name field. */ #define SAME_LABEL_REG_SAME_NAME_MULTI 0x8UL diff --git a/testfiles/issue103/top.h b/testfiles/issue103/top.h index 93c9285b..e5d315d3 100644 --- a/testfiles/issue103/top.h +++ b/testfiles/issue103/top.h @@ -1,6 +1,9 @@ #ifndef __CHEBY__TOP__H__ #define __CHEBY__TOP__H__ +#include + + #include "sub1.h" #include "sub2.h" #include "sub3.h" diff --git a/testfiles/issue67/repeatInRepeat.h b/testfiles/issue67/repeatInRepeat.h index b8239300..4a504f14 100644 --- a/testfiles/issue67/repeatInRepeat.h +++ b/testfiles/issue67/repeatInRepeat.h @@ -1,5 +1,8 @@ #ifndef __CHEBY__REPEATINREPEAT__H__ #define __CHEBY__REPEATINREPEAT__H__ + +#include + #define REPEATINREPEAT_SIZE 32 /* 0x20 */ /* None */ diff --git a/testfiles/issue67/repeatInRepeatC.h b/testfiles/issue67/repeatInRepeatC.h index 14c61bc6..325de3e4 100644 --- a/testfiles/issue67/repeatInRepeatC.h +++ b/testfiles/issue67/repeatInRepeatC.h @@ -1,5 +1,8 @@ #ifndef __CHEBY__REPEATINREPEATC__H__ #define __CHEBY__REPEATINREPEATC__H__ + +#include + #define REPEATINREPEATC_SIZE 32 /* 0x20 */ /* None */