How to find the signal which represents 16bit instructions in the design? - Printable Version +- PULP Community (https://pulp-platform.org/community) +-- Forum: PULP's Community forum (https://pulp-platform.org/community/forumdisplay.php?fid=1) +--- Forum: PULP General questions (https://pulp-platform.org/community/forumdisplay.php?fid=2) +--- Thread: How to find the signal which represents 16bit instructions in the design? (/showthread.php?tid=187) |
How to find the signal which represents 16bit instructions in the design? - ninipa - 04-26-2020 Hi, I'm trying certain software debug tool on pulpissimo. To build alignment between source code and disassembly, I need to trace both "pc" and the corresponding "instruction" in the design during runtime. I've found the "pc" shall be "tb_pulp.i_dut.soc_domain_i.pulp_soc_i.fc_subsystem_i.FC_CORE.lFC_CORE.id_stage_i.pc_id_i[31:0]" And probably the "inst" shall be "tb_pulp.i_dut.soc_domain_i.pulp_soc_i.fc_subsystem_i.FC_CORE.lFC_CORE.id_stage_i.instr[31:0]" For example, on "hello" case, a piece of disassembly is: The waveform is like: you can see when the instruction is 32bit, disassembly is matched with waveform (eg. pc=0x1c008130, inst=0x82f72a23) But when the instruction is 16bit, looks like I can find a signal in waveform to show the 16bit instruction correctly... for example, pc=0x1c008134, disassembly shows the instruction val=0xc69c; but the 32bit "inst" signal shows different value in the waveform... Instead, I find the 16bit inst atĀ output of L2 ram... But I can't use the output of L2 ram in my tool since it's too hard to align with pc... any ideas? Thank you! Hi, I just read RISCV manual, looks like these 16bit instructions are RV32C instructions? Then it's decoded into 32bit instruction in the design and the signal "tb_pulp.i_dut.soc_domain_i.pulp_soc_i.fc_subsystem_i.FC_CORE.lFC_CORE.id_stage_i.instr[31:0]" is the decoded one, right? So my question becomes --- can you point me the signal which cycle aligned with certain "pc" signal and the value is original? Thank you! RE: How to find the signal which represents 16bit instructions in the design? - bluewww - 04-26-2020 There is a one-to-one (with some exceptions) between compressed and uncompressed instructions. This decompression step is a combinatorial function in the id stage you could look there RE: How to find the signal which represents 16bit instructions in the design? - ninipa - 04-26-2020 (04-26-2020, 02:31 PM)bluewww Wrote: There is a one-to-one (with some exceptions) between compressed and uncompressed instructions. This decompression step is a combinatorial function in the id stage you could look there Hi, Thanks very much! I found that logic in "compressed_decoder", there areĀ some signals I can use to create what I need, just some extra logics. Thank you! |