From 7a3e5cac3b628c93b02c7b2914b2b0cb960bf234 Mon Sep 17 00:00:00 2001 From: Michael Neuling Date: Thu, 14 Jul 2022 10:32:37 +1000 Subject: [PATCH] Metavalue cleanup for pmu.vhdl Signed-off-by: Michael Neuling --- pmu.vhdl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pmu.vhdl b/pmu.vhdl index 2967f4e..928d6c2 100644 --- a/pmu.vhdl +++ b/pmu.vhdl @@ -217,7 +217,11 @@ begin -- Check for timebase events tbdiff := p_in.tbbits and not prev_tb; - tbbit := tbdiff(3 - to_integer(unsigned(mmcr0(MMCR0_TBSEL + 1 downto MMCR0_TBSEL)))); + if is_X(mmcr0) then + tbbit := 'X'; + else + tbbit := tbdiff(3 - to_integer(unsigned(mmcr0(MMCR0_TBSEL + 1 downto MMCR0_TBSEL)))); + end if; if tbbit = '1' and mmcr0(MMCR0_TBEE) = '1' then event := '1'; end if;