-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from stefanlippuner/c-preset-field
Consts - Add Preset Values of Fields
- Loading branch information
Showing
13 changed files
with
149 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#define HEADER_BLOCK_SIZE 8 | ||
#define ADDR_HEADER_BLOCK_REG_000_DRAWING_NUMBER 0x0UL | ||
#define HEADER_BLOCK_REG_000_DRAWING_NUMBER_PRESET 0x8000101UL | ||
#define ADDR_HEADER_BLOCK_REG_001_VERSION_REVISION 0x4UL | ||
#define HEADER_BLOCK_REG_001_VERSION_REVISION_VERSION_OFFSET 0 | ||
#define HEADER_BLOCK_REG_001_VERSION_REVISION_VERSION 0xfUL | ||
#define HEADER_BLOCK_REG_001_VERSION_REVISION_VERSION_PRESET 0x1UL | ||
#define HEADER_BLOCK_REG_001_VERSION_REVISION_REVISION_OFFSET 4 | ||
#define HEADER_BLOCK_REG_001_VERSION_REVISION_REVISION 0xff0UL | ||
#define HEADER_BLOCK_REG_001_VERSION_REVISION_REVISION_PRESET 0x0UL | ||
#define HEADER_BLOCK_REG_001_VERSION_REVISION_BUILD_DATE_OFFSET 12 | ||
#define HEADER_BLOCK_REG_001_VERSION_REVISION_BUILD_DATE 0xfffff000UL | ||
#define HEADER_BLOCK_REG_001_VERSION_REVISION_BUILD_DATE_PRESET 0x3840fUL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package header_block_Consts; | ||
localparam HEADER_BLOCK_SIZE = 8; | ||
localparam ADDR_HEADER_BLOCK_REG_000_DRAWING_NUMBER = 'h0; | ||
localparam HEADER_BLOCK_REG_000_DRAWING_NUMBER_PRESET = 32'h8000101; | ||
localparam ADDR_HEADER_BLOCK_REG_001_VERSION_REVISION = 'h4; | ||
localparam HEADER_BLOCK_REG_001_VERSION_REVISION_VERSION_OFFSET = 0; | ||
localparam HEADER_BLOCK_REG_001_VERSION_REVISION_VERSION = 32'hf; | ||
localparam HEADER_BLOCK_REG_001_VERSION_REVISION_VERSION_PRESET = 4'h1; | ||
localparam HEADER_BLOCK_REG_001_VERSION_REVISION_REVISION_OFFSET = 4; | ||
localparam HEADER_BLOCK_REG_001_VERSION_REVISION_REVISION = 32'hff0; | ||
localparam HEADER_BLOCK_REG_001_VERSION_REVISION_REVISION_PRESET = 8'h0; | ||
localparam HEADER_BLOCK_REG_001_VERSION_REVISION_BUILD_DATE_OFFSET = 12; | ||
localparam HEADER_BLOCK_REG_001_VERSION_REVISION_BUILD_DATE = 32'hfffff000; | ||
localparam HEADER_BLOCK_REG_001_VERSION_REVISION_BUILD_DATE_PRESET = 20'h3840f; | ||
endpackage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
`define HEADER_BLOCK_SIZE 8 | ||
`define ADDR_HEADER_BLOCK_REG_000_DRAWING_NUMBER 'h0 | ||
`define HEADER_BLOCK_REG_000_DRAWING_NUMBER_PRESET 'h8000101 | ||
`define ADDR_HEADER_BLOCK_REG_001_VERSION_REVISION 'h4 | ||
`define HEADER_BLOCK_REG_001_VERSION_REVISION_VERSION_OFFSET 0 | ||
`define HEADER_BLOCK_REG_001_VERSION_REVISION_VERSION 'hf | ||
`define HEADER_BLOCK_REG_001_VERSION_REVISION_VERSION_PRESET 'h1 | ||
`define HEADER_BLOCK_REG_001_VERSION_REVISION_REVISION_OFFSET 4 | ||
`define HEADER_BLOCK_REG_001_VERSION_REVISION_REVISION 'hff0 | ||
`define HEADER_BLOCK_REG_001_VERSION_REVISION_REVISION_PRESET 'h0 | ||
`define HEADER_BLOCK_REG_001_VERSION_REVISION_BUILD_DATE_OFFSET 12 | ||
`define HEADER_BLOCK_REG_001_VERSION_REVISION_BUILD_DATE 'hfffff000 | ||
`define HEADER_BLOCK_REG_001_VERSION_REVISION_BUILD_DATE_PRESET 'h3840f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
library ieee; | ||
use ieee.std_logic_1164.all; | ||
|
||
package header_block_Consts is | ||
constant HEADER_BLOCK_SIZE : Natural := 8; | ||
constant ADDR_HEADER_BLOCK_REG_000_DRAWING_NUMBER : Natural := 16#0#; | ||
constant HEADER_BLOCK_REG_000_DRAWING_NUMBER_PRESET : std_logic_vector(32-1 downto 0) := x"08000101"; | ||
constant ADDR_HEADER_BLOCK_REG_001_VERSION_REVISION : Natural := 16#4#; | ||
constant HEADER_BLOCK_REG_001_VERSION_REVISION_VERSION_OFFSET : Natural := 0; | ||
constant HEADER_BLOCK_REG_001_VERSION_REVISION_VERSION_PRESET : std_logic_vector(4-1 downto 0) := x"1"; | ||
constant HEADER_BLOCK_REG_001_VERSION_REVISION_REVISION_OFFSET : Natural := 4; | ||
constant HEADER_BLOCK_REG_001_VERSION_REVISION_REVISION_PRESET : std_logic_vector(8-1 downto 0) := x"00"; | ||
constant HEADER_BLOCK_REG_001_VERSION_REVISION_BUILD_DATE_OFFSET : Natural := 12; | ||
constant HEADER_BLOCK_REG_001_VERSION_REVISION_BUILD_DATE_PRESET : std_logic_vector(20-1 downto 0) := x"3840f"; | ||
end package header_block_Consts; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
library ieee; | ||
use ieee.std_logic_1164.all; | ||
|
||
package header_block_consts_pkg is | ||
constant c_HEADER_BLOCK_SIZE : Natural := 8; | ||
constant c_HEADER_BLOCK_REG_000_DRAWING_NUMBER_ADDR : Natural := 16#0#; | ||
constant c_HEADER_BLOCK_REG_000_DRAWING_NUMBER_PRESET : std_logic_vector(32-1 downto 0) := x"08000101"; | ||
constant c_HEADER_BLOCK_REG_001_VERSION_REVISION_ADDR : Natural := 16#4#; | ||
constant c_HEADER_BLOCK_REG_001_VERSION_REVISION_VERSION_OFFSET : Natural := 0; | ||
constant c_HEADER_BLOCK_REG_001_VERSION_REVISION_VERSION_PRESET : std_logic_vector(4-1 downto 0) := x"1"; | ||
constant c_HEADER_BLOCK_REG_001_VERSION_REVISION_REVISION_OFFSET : Natural := 4; | ||
constant c_HEADER_BLOCK_REG_001_VERSION_REVISION_REVISION_PRESET : std_logic_vector(8-1 downto 0) := x"00"; | ||
constant c_HEADER_BLOCK_REG_001_VERSION_REVISION_BUILD_DATE_OFFSET : Natural := 12; | ||
constant c_HEADER_BLOCK_REG_001_VERSION_REVISION_BUILD_DATE_PRESET : std_logic_vector(20-1 downto 0) := x"3840f"; | ||
end package header_block_consts_pkg; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
memory-map: | ||
bus: axi4-lite-32 | ||
name: header_block | ||
description: A Header Block | ||
x-hdl: | ||
reg-prefix: true | ||
children: | ||
# This preset exports to header fine | ||
- reg: | ||
name: reg_000_drawing_number | ||
address: 0x000 | ||
description: Identifier for the Drawing Number | ||
width: 32 | ||
access: ro | ||
preset: 0x08000101 | ||
x-hdl: | ||
type: const | ||
# These field presets does not export to header | ||
- reg: | ||
name: reg_001_version_revision | ||
address: 0x004 | ||
description: Version, Revision and Build Date | ||
width: 32 | ||
access: ro | ||
x-hdl: | ||
type: const | ||
children: | ||
- field: | ||
name: version | ||
range: 3-0 | ||
preset: 1 | ||
x-hdl: | ||
type: const | ||
- field: | ||
name: revision | ||
range: 11-4 | ||
preset: 0 | ||
x-hdl: | ||
type: const | ||
- field: | ||
name: build_date | ||
range: 31-12 | ||
preset: 0x3840f | ||
x-hdl: | ||
type: const |