Skip to content

Commit

Permalink
Testfiles - Update with same label and stdint C changes
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanlippuner committed May 24, 2024
1 parent 788027a commit 2e7b759
Show file tree
Hide file tree
Showing 11 changed files with 89 additions and 1 deletion.
3 changes: 3 additions & 0 deletions testfiles/bug-gen-c-02/fip_urv_regs.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#ifndef __CHEBY__FIP_URV_REGS__H__
#define __CHEBY__FIP_URV_REGS__H__

#include <stdint.h>


#include "mbox_regs.h"
#define FIP_URV_REGS_SIZE 16384 /* 0x4000 = 16KB */

Expand Down
3 changes: 3 additions & 0 deletions testfiles/bug-gen-c-02/mbox_regs.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#ifndef __CHEBY__MBOX_REGS__H__
#define __CHEBY__MBOX_REGS__H__

#include <stdint.h>

#define MBOX_REGS_SIZE 12 /* 0xc */

/* Mailbox to the fip urv */
Expand Down
13 changes: 13 additions & 0 deletions testfiles/bug-same-label/same_label-consts.h
Original file line number Diff line number Diff line change
@@ -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
15 changes: 15 additions & 0 deletions testfiles/bug-same-label/same_label-consts.sv
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions testfiles/bug-same-label/same_label-consts.v
Original file line number Diff line number Diff line change
@@ -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
15 changes: 15 additions & 0 deletions testfiles/bug-same-label/same_label-consts.vhdl
Original file line number Diff line number Diff line change
@@ -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;
15 changes: 15 additions & 0 deletions testfiles/bug-same-label/same_label-consts.vhdl-ohwr
Original file line number Diff line number Diff line change
@@ -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;
4 changes: 3 additions & 1 deletion testfiles/bug-same-label/same_label.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#ifndef __CHEBY__SAME_LABEL_REG__H__
#define __CHEBY__SAME_LABEL_REG__H__

#include <stdint.h>

#define SAME_LABEL_REG_SIZE 16 /* 0x10 */

/* Register without fields. */
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions testfiles/issue103/top.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#ifndef __CHEBY__TOP__H__
#define __CHEBY__TOP__H__

#include <stdint.h>


#include "sub1.h"
#include "sub2.h"
#include "sub3.h"
Expand Down
3 changes: 3 additions & 0 deletions testfiles/issue67/repeatInRepeat.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#ifndef __CHEBY__REPEATINREPEAT__H__
#define __CHEBY__REPEATINREPEAT__H__

#include <stdint.h>

#define REPEATINREPEAT_SIZE 32 /* 0x20 */

/* None */
Expand Down
3 changes: 3 additions & 0 deletions testfiles/issue67/repeatInRepeatC.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#ifndef __CHEBY__REPEATINREPEATC__H__
#define __CHEBY__REPEATINREPEATC__H__

#include <stdint.h>

#define REPEATINREPEATC_SIZE 32 /* 0x20 */

/* None */
Expand Down

0 comments on commit 2e7b759

Please sign in to comment.