Why is it required to increment PC by 4bits in RISC Architecture?
83 views
Skip to first unread message
Meet Sangani
unread,
Dec 20, 2023, 11:55:56 AM12/20/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to RISC-V HW Dev
Hello Everyone,
I am currently working on developing a 32bit RISC-V core and I am getting confused when PC is incremented by 4 bits. Since my PC is 32bit wide so one complete instruction can be fetched from memory in one clock cycle. Then why it is required to increment PC by 4bits?
Please help me in this situation and explain in detail is possible.
Ahmed Juba
unread,
Feb 29, 2024, 9:27:27 AMFeb 29
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to RISC-V HW Dev, meetsanga...@gmail.com
Hello There,
Because the memory is byte-aligned, and the instruction is 32-bits wide which's 4 bytes so in order to fetch the next instruction you have to increment the pc with 4 bytes that addresses next instruction.
Tommy Murphy
unread,
Feb 29, 2024, 9:46:08 AMFeb 29
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ahmed Juba, RISC-V HW Dev, meetsanga...@gmail.com
> and the instruction is 32-bits
Not necessarily - e.g. 16-bit compressed instructions.