Skip to content

Added minimal example program#7

Open
nchronas wants to merge 5 commits intolowRISC:minion-v0.4from
nchronas:minion_minimal
Open

Added minimal example program#7
nchronas wants to merge 5 commits intolowRISC:minion-v0.4from
nchronas:minion_minimal

Conversation

@nchronas
Copy link
Collaborator

A minimal example for minion, based on the hello and bootstrap software, with serial usage and led blink.

Needs testing on hardware

@asb
Copy link
Member

asb commented Aug 22, 2017

Thanks Nik. Did you mean to include code.v?

@nchronas
Copy link
Collaborator Author

Yes, the example is designed with the intention to be used in hardware. Also the code.v and data.v will be used in the Arty port.

@jrrk
Copy link
Member

jrrk commented Aug 22, 2017 via email

@asb
Copy link
Member

asb commented Aug 22, 2017

That's what I was thinking, but I now see that software/bootstrap/ has code.v and data.v checked in. The main advantage of having these generated files checked in would be to remove the ocaml dependency. But given code.v and data.v are effectively binaries, they should really be distributed with appropriate copyright notices for any code that is linked in (e.g. newlib). I suggest we don't include generated code.v and data.v files in the repo, and move the rom generators to Python if the ocaml dependency proves to be a barrier.

@nchronas
Copy link
Collaborator Author

I will then remove the code.v and data.v from the PR.

@nchronas
Copy link
Collaborator Author

Tested on arty, with the minimal C program and working.

I modified the one_hot_rdata[3] by replacing the uart_wrcount with a wire that subtracks the FIFO read and write counts, so the FIFO available bytes are shown.

@nchronas nchronas changed the title WIP: Added minimal example program Added minimal example program Aug 24, 2017
@asb asb requested a review from jrrk August 25, 2017 09:04
@asb
Copy link
Member

asb commented Aug 25, 2017

The C code looks good to me. Jonathan, are you happy with the Verilog change?

@jrrk
Copy link
Member

jrrk commented Sep 18, 2017

I don't think the bootstrap directory depends on newlib, it would be far too big. The benefit of having binaries checked in is that an FPGA build may be achieved without having the special Pulpino toolchain installed. The lowrisc_chip uses this technique as well to provide an initial boot.bin

@asb
Copy link
Member

asb commented Sep 18, 2017

No, the bootstrap program supplies its own minimal implementations of libc functions it needs. I can see the argument for reducing the dependency on other software, so we can certainly add code.v and data.v back in to this PR.

Are you happy with the verilog change?

@jrrk
Copy link
Member

jrrk commented Sep 18, 2017

The minion subsystem, when instantiated in Rocket, does not use the UART, since it would conflict with the trace debugger. Therefore we can safely change the details of the UART Verilog API to match the nchronas implementation. I can't really comment on the software element due to a lack of familiarity with RISCV assembly language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants