From ad9f1ea96394d7474fccc20ca6fc51c0683f1bfc Mon Sep 17 00:00:00 2001
From: Mattia Rizzi <mattia.rizzi@cern.ch>
Date: Tue, 15 Dec 2020 15:48:33 +0100
Subject: [PATCH] Added local tmr and onehot encode. this entity has never been
 tested in radiation

---
 hdl/wb_envm.vhd | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/hdl/wb_envm.vhd b/hdl/wb_envm.vhd
index 67ad9c3..0cd6b19 100644
--- a/hdl/wb_envm.vhd
+++ b/hdl/wb_envm.vhd
@@ -53,6 +53,12 @@ signal envm_read_req_p, apb_read_req, apb_read_req_boot, apb_read_req_wb, apb_re
 signal wb_write_req, wb_write_req_boot, wb_write_req_wb, wb_write_ack : std_logic;
 signal wb_addr, wb_addr_boot, wb_addr_wb : std_logic_vector (16 downto 0);
 signal counter : unsigned (9 downto 0);
+
+attribute syn_encoding : string; 
+attribute syn_encoding of bootstrap_fsm, wb_fsm, apb_fsm, envm_fsm : signal is "safe,onehot";
+
+attribute syn_radhardlevel : string;
+attribute syn_radhardlevel of rtl : architecture is "tmr";
 begin
 
 apb_addr <= apb_addr_boot when (rst_cpu_o = '1') else apb_addr_wb;
@@ -176,7 +182,7 @@ if rising_edge(clk_i) then
 	else 
 		case (apb_fsm) is 
 			when idle =>
-                apb_read_ack <= '0';
+                		apb_read_ack <= '0';
 				if (apb_read_req = '1' and apb_read_ack = '0') then
 					apb_fsm <= setup;
 					apb_psel_o <= '1';
@@ -283,4 +289,4 @@ end process;
 			
 
 
-end architecture;
\ No newline at end of file
+end architecture;
-- 
GitLab