-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate Zifencei extension from base ISA
The `fence.i` instruction has been part of the Zifencei extension instead of the base ISA since version 2.1 in 2019. This updates the model to separate it into its own file and gates it on `extensionEnabled(Ext_Zifencei)`.
- Loading branch information
1 parent
633a8c7
commit 1d152e8
Showing
3 changed files
with
25 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/*=======================================================================================*/ | ||
/* This Sail RISC-V architecture model, comprising all files and */ | ||
/* directories except where otherwise noted is subject the BSD */ | ||
/* two-clause license in the LICENSE file. */ | ||
/* */ | ||
/* SPDX-License-Identifier: BSD-2-Clause */ | ||
/*=======================================================================================*/ | ||
|
||
/* ****************************************************************** */ | ||
/* This file specifies the instructions in the 'Zifencei' extension. */ | ||
|
||
/* ****************************************************************** */ | ||
enum clause extension = Ext_Zifencei | ||
function clause extensionEnabled(Ext_Zifencei) = true | ||
|
||
union clause ast = FENCEI : unit | ||
|
||
mapping clause encdec = FENCEI() if extensionEnabled(Ext_Zifencei) | ||
<-> 0b000000000000 @ 0b00000 @ 0b001 @ 0b00000 @ 0b0001111 if extensionEnabled(Ext_Zifencei) | ||
|
||
/* fence.i is a nop for the memory model */ | ||
function clause execute FENCEI() = { /* __barrier(Barrier_RISCV_i); */ RETIRE_SUCCESS } | ||
|
||
mapping clause assembly = FENCEI() <-> "fence.i" |