--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+unsubscribe@groups.riscv.org.
To post to this group, send email to sw-...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/FF5187E2-D624-4D71-BE11-1CBD5725D5AF%40roalogic.com.
I too use .hex files for running my hw simulations. As of now I am using the following "hack" to generate a valid hex which starts from 0x80000000.
Obviously my testbench treats 0x8******* as 0x0******* for now.
riscv64-unknown-elf-objcopy -O verilog -j .text -j .tohost -j .data --gap-fill 00000000 --reverse-bytes=4 output.riscv temphex sed -i 's/ //g' temphex" gen_usable_hex.py # this code is presented below.
#!/usr/bin/env python
import config
import textwrap
infile=open('temphex','r')
outfile=open('code.hex','w')
for lineno,line in enumerate(infile):
if('@' in line):
continue
else:
line=textwrap.wrap(line,8)
for i in range(len(line)):
outfile.write(line[i])
outfile.write("\n")
if(config.sperateInstrDataMemory==True):
if('0000006f' in line):
outfile.close();
outfile=open('memory.hex','w');
infile.close()
outfile.close()
For now this procedure works for us. You can also visit our shakti repo for more details.
After the memory map changed programs begin at 0x80000000 and so elf2hex thinks this address is out of the requested range( 0 to width*depth). Depending on how you have been loading the hex files you may be able to specify this offset or work around it in some other way, in which case you can just change the assertion to take into account you are only generating a hex for addresses past 0x80000000. Rocket-chip no longer supports loading programs via hex file so the generation of .hex has lower priority.
On Mon, Jan 30, 2017 at 7:29 AM, Richard Herveille <richard....@roalogic.com> wrote:
I thought I’d update my regression suite again, based on/using the latest tests on github.It seems a lot changed in the overal setup since my last update.Worst change, for me, is that I can’t generate .hex files anymore; I get some error on ../fesvr/htif_hexwrtie.cc:15 virtual void htif_hexwriter_t::read_chunk(adds_t, size_t, void*): Assertion ‘taddr < width*depth’ failed.Does anybody have an idea what that means?!I used to run the .hex files in my hardware simulation (not in spike). My test bench picks up the .hex files, writes it into memory and launches the CPU.RichardROA LOGICDesign Services and Silicon Proven IPRichard HerveilleManaging DirectorPhone +31 (45) 405 5681Cell +31 (6) 5207 2230
--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+un...@groups.riscv.org.
On 30 Jan 2017, at 18:22, Colin Schmidt <col...@eecs.berkeley.edu> wrote:It changed in this commit(https://github.com/riscv/riscv-tools/commit/40a956a7a5335c051416a69eed7d28936b8d967a). I'm not sure where it lives in the spec. You should be able to just subtract that address from taddr in the assertion and where elf2hex does the writing, to work around this issue. A better way to support it that could be upstreamed would probably be another argument to elf2hex that gives the offset to start at.On Mon, Jan 30, 2017 at 9:12 AM, Richard Herveille <richard....@roalogic.com> wrote:This is not Rocket (there are other hardware implementation out there too :-).For embedded applications .hex is still the way to go. Support for generating .hex files must be part of the toolchain.Then this is not related to loading the hex file, but to actually generating it. I don’t need fesvr, but still elf2hex seem to think it is needed. Is this hardcoded somewhere?Second is there a description of the new memory map? I can’t find it in the privileged spec.Richard
ROA LOGICDesign Services and Silicon Proven IPRichard HerveilleManaging DirectorPhone +31 (45) 405 5681Cell +31 (6) 5207 2230
On 30 Jan 2017, at 17:43, Colin Schmidt <col...@eecs.berkeley.edu> wrote:
After the memory map changed programs begin at 0x80000000 and so elf2hex thinks this address is out of the requested range( 0 to width*depth). Depending on how you have been loading the hex files you may be able to specify this offset or work around it in some other way, in which case you can just change the assertion to take into account you are only generating a hex for addresses past 0x80000000. Rocket-chip no longer supports loading programs via hex file so the generation of .hex has lower priority.
On Mon, Jan 30, 2017 at 7:29 AM, Richard Herveille <richard.herveille@roalogic.com> wrote:
I thought I’d update my regression suite again, based on/using the latest tests on github.It seems a lot changed in the overal setup since my last update.Worst change, for me, is that I can’t generate .hex files anymore; I get some error on ../fesvr/htif_hexwrtie.cc:15 virtual void htif_hexwriter_t::read_chunk(adds_t, size_t, void*): Assertion ‘taddr < width*depth’ failed.Does anybody have an idea what that means?!I used to run the .hex files in my hardware simulation (not in spike). My test bench picks up the .hex files, writes it into memory and launches the CPU.RichardROA LOGICDesign Services and Silicon Proven IPRichard HerveilleManaging DirectorPhone +31 (45) 405 5681Cell +31 (6) 5207 2230
--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+un...@groups.riscv.org.
This is what I had done for the previous lowRISC release.
-Wei
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/B32083FE-61C3-4399-AB9F-E85312A9AF82%40roalogic.com.
This is what I had done for the previous lowRISC release.
-Wei
On 31/01/17 12:02, Richard Herveille wrote:
I might give this a go.What argument name would you propose? I’ll take a look at the code to see if I am able to add this.
Richard
ROA LOGICDesign Services and Silicon Proven IP
Richard HerveilleManaging DirectorPhone +31 (45) 405 5681Cell +31 (6) 5207 2230
On 30 Jan 2017, at 18:22, Colin Schmidt <col...@eecs.berkeley.edu> wrote:
It changed in this commit(https://github.com/riscv/riscv-tools/commit/40a956a7a5335c051416a69eed7d28936b8d967a). I'm not sure where it lives in the spec. You should be able to just subtract that address from taddr in the assertion and where elf2hex does the writing, to work around this issue. A better way to support it that could be upstreamed would probably be another argument to elf2hex that gives the offset to start at.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+unsubscribe@groups.riscv.org.
To post to this group, send email to sw-...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/B32083FE-61C3-4399-AB9F-E85312A9AF82%40roalogic.com.
--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+unsubscribe@groups.riscv.org.
To post to this group, send email to sw-...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/a21cdcef-8c25-da97-8fbe-1c0b20527810%40cam.ac.uk.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/856AC771-7A7A-4A01-996D-43AE5141A2EB%40roalogic.com.
A PR has been submitted to riscv-fesvr. -Wei
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/80A0B771-74E3-4162-A82F-D5EE9B8E0210%40cam.ac.uk.
elf2hex: ../fesvr/htif_hexwriter.cc:40: virtual void htif_hexwriter_t::write_chunk(addr_t, size_t, const void*): Assertion `taddr < width*depth' failed.
To post to this group, send email to sw...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/FF5187E2-D624-4D71-BE11-1CBD5725D5AF%40roalogic.com.
--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+un...@groups.riscv.org.
To post to this group, send email to ...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/B32083FE-61C3-4399-AB9F-E85312A9AF82%40roalogic.com.
--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+un...@groups.riscv.org.
To post to this group, send email to ...@groups.riscv.org.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/a21cdcef-8c25-da97-8fbe-1c0b20527810%40cam.ac.uk.
--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+un...@groups.riscv.org.
To post to this group, send email to sw-...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/856AC771-7A7A-4A01-996D-43AE5141A2EB%40roalogic.com.