private_config_pkg.vhd 2.66 KB
Newer Older
1
--------------------------------------------------------------------------------
2
3
4
-- Fault InJection Instrumenter (FIJI)
-- https://embsys.technikum-wien.at/projects/vecs/fiji
--
5
6
7
8
-- The creation of this file has been supported by the publicly funded
-- R&D project Josef Ressel Center for Verification of Embedded Computing
-- Systems (VECS) managed by the Christian Doppler Gesellschaft (CDG).
--
9
10
11
-- Authors:
-- Christian Fibich <fibich@technikum-wien.at>
-- Stefan Tauner <tauner@technikum-wien.at>
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--
-- Copyright and related rights are licensed under the Solderpad Hardware
-- License, Version 0.51 (the "License"); you may not use this file except
-- in compliance with the License. You may obtain a copy of the License at
-- http://solderpad.org/licenses/SHL-0.51. Unless required by applicable
-- law or agreed to in writing, software, hardware and materials
-- distributed under this License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expressed or
-- implied. See the License for the specific language governing
-- permissions and limitations under the License.
--
-- See the LICENSE file for more details.
--
-- Description:
--  Private configuration package
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
--------------------------------------------------------------------------------

library ieee;
use ieee.std_logic_1164.all;
use ieee.math_real.all;

package private_config_pkg is

  ------------------------------------------------------------------------------
  -- Design configuration
  ------------------------------------------------------------------------------

  -- number of messages which can be stored in the tx buffer
  constant c_tx_buffer_depth : natural := 4;

  ------------------------------------------------------------------------------
  -- Controller Configuration
  ------------------------------------------------------------------------------

  -- Width of the FIC Config Data (Trigger, Timers, Reset)
  constant c_config_width : positive := 8;
  -- Width of the FIJI ID
  constant c_id_width     : positive := 16;

  -- CRC8 Polynomial 
  constant c_crc8_poly    : std_logic_vector(7 downto 0) := X"E0";
  constant c_crc8_initial : std_logic_vector(7 downto 0) := X"FF";

  -- number of fault patterns
  constant c_num_patterns    : positive range 2 to positive'high := 2;
  -- bits needed to encode fault patterns in binary
  constant c_pattern_bits    : natural                           := natural(ceil(log2(real(c_num_patterns))));
  -- number of bits per fault pattern
  constant c_num_select_bits : positive                          := 3;

  -- number of input nets for fault detection
63
  constant c_num_fault_detect_nets : positive := 2;
64
65
66
67

end package private_config_pkg;