Why PC in RISC V architecture connect with PC+4 instead of PC+2 or PC+1. I think it depend on the width of memory cell of the Instruction Memory (IMEM). If the width is 16 bits, then we need to load two adjacent addresses to fill 32 bits instruction or if the width is 32 bits, we only need to load one address to take the full instruction.
Why Program Counter in RISC V should be added by 4 instead of adding 0 or 2
6.6k Views Asked by Khoa Trần At
1
There are 1 best solutions below
Related Questions in MEMORY
- Asp.Net 5 correct way to access logging config file from Startup.cs
- How and Where to tell if a ViewComponent has been invoked x times in a view?
- Unable to utilize UrlHelper
- IdentityManager with VNext
- How to output css to kestrel in OS X using Visual Studio Code
- How to configure email settings in ASP.NET 5?
- Override site binding using VS2015 and IIS Express
- Setting IIS Settings in Web.config using ASP.NET MVC 6
- HTTP Error 403.14 in ASP.NET5 MVC6
- What is first class mechanism in EF?
Related Questions in PROGRAM-COUNTER
- Asp.Net 5 correct way to access logging config file from Startup.cs
- How and Where to tell if a ViewComponent has been invoked x times in a view?
- Unable to utilize UrlHelper
- IdentityManager with VNext
- How to output css to kestrel in OS X using Visual Studio Code
- How to configure email settings in ASP.NET 5?
- Override site binding using VS2015 and IIS Express
- Setting IIS Settings in Web.config using ASP.NET MVC 6
- HTTP Error 403.14 in ASP.NET5 MVC6
- What is first class mechanism in EF?
Related Questions in RISCV32
- Asp.Net 5 correct way to access logging config file from Startup.cs
- How and Where to tell if a ViewComponent has been invoked x times in a view?
- Unable to utilize UrlHelper
- IdentityManager with VNext
- How to output css to kestrel in OS X using Visual Studio Code
- How to configure email settings in ASP.NET 5?
- Override site binding using VS2015 and IIS Express
- Setting IIS Settings in Web.config using ASP.NET MVC 6
- HTTP Error 403.14 in ASP.NET5 MVC6
- What is first class mechanism in EF?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
RISC-V deals with everything in byte addresses (from page 19 of the ISA manual: "RV32I provides a 32-bit user address space that is byte-addressed and little-endian"). So when using byte addresses, it makes sense to think of the PC as incrementing by 4, as each of the RV32 instructions are 4 bytes.
When we say RISC-V increments the PC by 4, what that means is that for any given byte address
X
of a 32-bit RISC-V instruction, the next instruction will begin in memory at addressX+4
. (Note that when using compressed instructions, which are 16 bits / 2 bytes, the PC is incremented by 2).An IMEM read width of 16 bits means 2 reads from IMEM are necessary to get a full instruction, and an IMEM read width of 32 bits means only 1 read from IMEM is necessary to get a full instruction. But these are implementation considerations, not an ISA considerations -- you could hypothetically implement an ISA-compliant RISC-V processor with either type of IMEM.