made machine timer bit of IP registers unwriteable so it can only change when the interrupt actually changes

This commit is contained in:
Kip Macsai-Goren 2022-03-29 02:26:42 +00:00
parent c32f5e9cee
commit ad106e7130

View File

@ -94,8 +94,8 @@ module csri #(parameter
// restricted views of registers
// Add ExtIntM read-only signal
assign IP_REGW = {ExtIntM,1'b0,ExtIntS,9'b0} | {2'b0,IP_REGW_writeable};
assign IP_REGW = {ExtIntM,1'b0,ExtIntS,1'b0, IntInM[7], 7'b0} | {2'b0, IP_REGW_writeable[9], 3'b0, IP_REGW_writeable[5], 3'b0, IP_REGW_writeable[1], 1'b0}; // *** This is just to force the Machine level bits of IP to be unwriteable and to only come from intInM. PLEASE CHANGE ME!!!
// Machine Mode
assign MIP_REGW = IP_REGW;
assign MIE_REGW = IE_REGW;