Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [openhw.core-v.sw] OpenHW: request for help with our "test program execution environment"
  • From: Jeremy Bennett <jeremy.bennett@xxxxxxxxxxxx>
  • Date: Fri, 15 May 2020 17:56:31 +0100
  • Autocrypt: addr=jeremy.bennett@xxxxxxxxxxxx; keydata= mQGiBEnDq+8RBACazhX1MUYl3LIurwWxJWhR/0JYLhaZhI9mhi2/1vBxkIubSi7ZQn0vaF5f 11YmQqKAtqRRKp0BflUwvjjEpgfY6Bb251MaxGeY3kZE2v33JqHCvuCWxt7YwNUgaA7QAkSo 3ea5R9BiP1ncfppSzcHznEyYy6tzoF6AxWNy64E6OwCgk/set6NdP7cbCW+1VubstJLOTu8D /A3IAPe+LWBABcakcbo3skoCimDqR0JE3JZJm2uLJ5Yyyk7mFQiaalUvfOuecFKiuhll2FHq kg7upU+ZgQgpb6qmCt60L7NsLlmNPhj7pRkPElHYoRamEi5ycDM8abM908xemzJJ8Kv5sq/D AeaQcrDiNz/c0COEQGI1AQRNY+5YA/9XUTAjFc2Mdxs1x9s0JspwTMoHi2MWoyaIiQA55/F7 qSAYumjPFrQhELnxXNS0o2hOXXp8SdSE8jfENj1iMebDcVkt8brRLjg9JnxJQYccTO4QlvLD hhKS2yB99UCEzqjhzhzt8awIeXlRD2DuHhw3pi9XOM0j/oam3izaWnXbrLQ7SmVyZW15IEJl bm5ldHQgKEplcmVteSBIb21lIGtleSkgPGplcmVteUBqZXJlbXliZW5uZXR0LmNvbT6IYgQT EQIAIgUCVVrodwIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQvvWBcvtHVOGezQCf ZaxQR7BMPlvsmtxazEyVmEc+I/cAoIMnfrT/XCDRuuBp/YaXKpOf4ouOuQINBEnDq+8QCACj rS2Q9dIbQKg/s3x/FaAovRfBUcauoWfToBLvy6S0a/KQeSF5KdWWIS3EtxZjSuV5A+Yj5DHy 8dHjNEjPfAwR/GOJA6JF5WUHkTIPHi90rYriWehhtaK6hXpq89Raf48Bdw3giKN5Zy5bsXm1 Kp+b6CclJ9tzjpkbvGrJK4NfUwDcxO6M9BWkhTFAGkHPPTUexl9kFYYmp6yVwmojwqWLi6TI zHobg9pY6KVsQ/Ob3AGwDTNShYF42zJLehnLaeeGNhcsP4yKKGqFdyaa/M16Bjv6JXHXiXHc derOAH5UpDhnah6ZTEC5WKvJ0j4JrlVpBSGLZzLIZuVJAi2Dky6XAAMFCACKCUxQ5pPMw433 JmRnCKvYnsQdBY3W8UsCwvwX8Am3l8CgCFJnGQIEb/VS1GYw+3OeY7jhY368qm51vijJasqW MF7upeSVn5N6cWuR5ORjnNPqf9NXxhfTlCpWvSH6rRAVHXvG8qxi52nfHnK8NsH0G+zc/1PR ak064+TIlC8ZHdUqeQ6+ByeS7EPwZS2ODg5j1IYpkKE1EfDUN7TfgkvsxGjuJwXVKLWgNZps O8qu5CcnTa70ywziF7xWUgHEtkzsQdPJWRRMjQULsnmrK/ySBgPHuPPO70IvB51IkxXOZTzC NHfwIGG1je1icwvcPTB52vXGMqZQp6yZzEc0tuATiEkEGBECAAkFAknDq+8CGwwACgkQvvWB cvtHVOEuDwCcCiTxCqrN8ndGXbKgOqyCFEzd0YQAn0xiO8Gm70ehZCS9WUrVpTu1QNl6
  • Delivered-to: openhw.core-v.sw@xxxxxxxxxxx
  • List-archive: <https://dev.eclipse.org/mailman/private/openhw.core-v.sw>
  • List-help: <mailto:openhw.core-v.sw-request@eclipse.org?subject=help>
  • List-subscribe: <https://dev.eclipse.org/mailman/listinfo/openhw.core-v.sw>, <mailto:openhw.core-v.sw-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://dev.eclipse.org/mailman/options/openhw.core-v.sw>, <mailto:openhw.core-v.sw-request@eclipse.org?subject=unsubscribe>
  • Organization: Embecosm
  • User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 15/05/2020 16:34, Mike Thompson wrote:
> Thanks Yunhai, I also am looking forward to working closely with
> you. I think you understand the issue.  Let me reply to your
> comments:
>
> you can lead to build the "Test Program Enviroment", and we will
> help you solve the problem you encounter.
>
> The Test Program Environment is already in place.  Here is a
> picture of one of our testbenches that shows the TPE in
> relationship to the overall simulation environment.   This is all
> in place today and running. However, we have a unique TPE (crt0.S,
> link.ld, etc.) for every test (testcase.S).   The goal is to create
> a single set of TPE files that will be compatible with the hardware
> model (inside the yellow box at the right of the Figure) and all
> test programs. image.png

Hi Mike,

This diagram is useful. Am I correct that you restart the simulation
each time you want to run a piece of software.

For this approach, all you need is:
- - a version of newlib which implements the library functions as writes
to the shared area rather than syscalls.
- - a suitable linker script
- - possibly a new crt0.s, although I would hope the standard one is fine.

Can you point me at a documentation of the memory map and the memory
mapped peripheral area.  If you can then send me a few of your example
programs, I'll see what is needed.

Are you intending running C++ programs as well as C?

The approach I suggested in my previous email is more generic, and
probably where you want to end up eventually. It will allow you to use
the same tool chain and interface for all different targets,
simulation or physical hardware. It also means you can debug the
software when something goes wrong.

Best wishes,


Jeremy

> The second idea is that you can help us to build the whole
> verification environment(test sets can be run in it), preferably a
> virtual machine image, and then we can build the "TPE" together. We
> can do this.   As you may know, IBM is a member of the OpenHW
> Group and they are contributing Cloud services to us.   I can
> easily create a new VM for you to use.  I am not sure this will be
> necessary as the problem is with the software, not the
> SystemVerilog simulator.
>
> ---mike
>
> On Fri, May 15, 2020 at 10:55 AM 尚云海 <yunhai.syh@xxxxxxxxxxxxxxx
> <mailto:yunhai.syh@xxxxxxxxxxxxxxx>> wrote:
>
> Hi Mike,
>
> Glad hear from you.
>
> Your idea is very good and I am agree with you. Because I don't
> have the verification environment to run, there is no good way to
> kown how these test sets work together. Every test set may need
> different enviroment.
>
> I have two ideas to move this forward. The first is that you can
> lead to build the "Test Program Enviroment", and we will help you
> solve the problem you encounter. The second idea is that you can
> help us to build the whole verification environment(test sets can
> be run in it), preferably a virtual machine image, and then we can
> build the "TPE" together.
>
>
> Best wishes, Yunhai
>
> ------------------------------------------------------------------
> 发件人:Mike Thompson <mike@xxxxxxxxxxxxxxx
> <mailto:mike@xxxxxxxxxxxxxxx>> 发送时间:2020年5月15日(星期五) 22:04 收件
> 人:jeremy.bennett <jeremy.bennett@xxxxxxxxxxxx
> <mailto:jeremy.bennett@xxxxxxxxxxxx>>; Craig Blackmore
> <craig.blackmore@xxxxxxxxxxxx
> <mailto:craig.blackmore@xxxxxxxxxxxx>>; zbigniew.chamski
> <zbigniew.chamski@xxxxxxxx <mailto:zbigniew.chamski@xxxxxxxx>>; 尚云海
> <yunhai.syh@xxxxxxxxxxxxxxx <mailto:yunhai.syh@xxxxxxxxxxxxxxx>>;
> JACQ Sebastien <sebastien.jacq@xxxxxxxxxxxxxxx
> <mailto:sebastien.jacq@xxxxxxxxxxxxxxx>> 抄 送:zbigniew.chamski
> <zbigniew.chamski@xxxxxxxxx <mailto:zbigniew.chamski@xxxxxxxxx>>;
> Paul Zavalney <Paul.Zavalney@xxxxxxxxxx
> <mailto:Paul.Zavalney@xxxxxxxxxx>> 主 题:Re: OpenHW: request for help
> with our "test program execution environment"
>
> Adding Sebastien Jacq of Thales TDT to this thread.
>
> ---mike
>
> On Fri, May 15, 2020 at 9:00 AM Mike Thompson <mike@xxxxxxxxxxxxxxx
> <mailto:mike@xxxxxxxxxxxxxxx>> wrote: Hi,
>
> I think everyone knows me, but just in case, let me (re) introduce
> myself - this is Mike Thompson, Director of Engineering for the
> OpenHW Group's Verification Task Force.  I'm reaching out to you as
> you all members of the Software Task Group and I have an urgent
> need for your expertise to define and implement a "Test Program
> Environment" for our simulation testbenches.  I anticipate that
> this would be no more than two or three days work for a software
> developer comfortable working on "bare metal" systems.  Can we set
> up a conference call to discuss this?
>
> A bit of background is below:
>
> The simulation testbench for the SystemVerilog RTL model of the
> CV32E40P core implements a very simple "bare metal" execution
> environment for the core.  Basically, what we have is a 1Mbyte
> address space for instruction and data memory, a small area for
> debug code plus a set of memory mapped "virtual peripherals" that
> allow code running on the core to interact with the simulation.
> These virtual peripherals are spec'd in the Simulation Tests
>
<https://core-v-docs-verif-strat.readthedocs.io/en/latest/sim_tests.html#virtual-peripherals>
>
>
chapter of the Verification Strategy document on readthedocs.
>
> We already have code from a variety of sources that executes on
> this "bare metal" execution environment in simulation.  For
> example, we want to run Compliance tests from the RISC-V
> Foundation, a set of tests we inherited from the PULP team, a set
> of tests being developed by Paul Zavalney of SiLabs for debug
> verification and test programs auto-generated by the Google random
> instruction generator.
>
> The issue we are facing is that each of these sources of test
> programs comes with its own software support files such as a C
> run-time config (crt0.S), linker control file (link.ld), vector
> jump tables (vector.S) and associated library routines.   Some of
> this is quite old with a long forgotten history and some is very
> new, hacked together to "make it work".
>
> My objective is to have a single set of these files which I am
> calling a Test Program Environment
>
<https://core-v-docs-verif-strat.readthedocs.io/en/latest/test_program_environment.html>
>
>
that would be used for all test porgrams running in simulation.
> I have made an attempt to create such a thing, but I am operating
> at the extreme edge of my skillset and progress is slow.  So I am
> asking if someone from the Software Task Group can spend some time
> having a look at what we've got and helping to define and implement
> an environment that meets our current and future needs.
>
> Cheers, ---mike
>
>


- -- 
Cell: +44 (7970) 676050
SkypeID: jeremybennett
Twitter: @jeremypbennett
Email: jeremy.bennett@xxxxxxxxxxxx
Web: www.embecosm.com
PGP key: 1024D/BEF58172FB4754E1 2009-03-20
-----BEGIN PGP SIGNATURE-----

iF0EARECAB0WIQRASGDWqmhRZUfAaPW+9YFy+0dU4QUCXr7JvgAKCRC+9YFy+0dU
4W55AJ9vRuVZDe5A6US9jXc7pPSgHNNmvwCfe2R6I6mx0YB8wroltAvZE00d3HI=
=PXea
-----END PGP SIGNATURE-----


Back to the top