Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running proxy kernel on Openpiton #86

Open
Rahul-Kande opened this issue Jul 28, 2020 · 2 comments
Open

Running proxy kernel on Openpiton #86

Rahul-Kande opened this issue Jul 28, 2020 · 2 comments

Comments

@Rahul-Kande
Copy link

Hello,

May I know if there is a way to run proxy kernel on openpiton (https://github.com/riscv/riscv-pk) through simulation and through running openpiton on AWS F1 instances?
I am planning on running simple user applications on top of the proxy kernel on openpiton.

@Rahul-Kande
Copy link
Author

does this work?

< compile pk >
mv <pk elf file> <piton/build path>
mv pk diag.exe
rv64_img
<vsim command>

@Jbalkind
Copy link
Collaborator

We don't have support for the proxy kernel built in, though stubs of what you would need to implement for use in simulation are there. Michael worked on this a little before he finished his work on the Ariane integration, but it wasn't complete and I don't personally know what more is needed as I haven't used the proxy kernel myself.

You can see the RISCV_FESVR_SIM macro here: https://github.com/openhwgroup/cva6/blob/dcea6c97d43b4a03f703f515990b3eab9082e6c9/openpiton/riscv_peripherals.sv#L112-L139

If you just want to be able to do debug with gdb, you could definitely wire the top level JTAG in system.v to whatever virtual JTAG that is provided by F1. JTAG works correctly on the genesys2 so if the F1 virtual JTAG is similar then it should be straightforward. Using a BSCANE2-based JTAG like some of the other boards would use (

// `ifdef VCU118_BOARD
// wire tck_i, tms_i, trst_ni, td_i, td_o;
// // hook the RISC-V JTAG TAP into the FPGA JTAG chain
// BSCANE2 #(
// .JTAG_CHAIN(1) // Value for USER command. Possible values: 1-4.
// ) BSCANE2_inst (
// .CAPTURE(), // 1-bit output: CAPTURE output from TAP controller.
// .DRCK(), // 1-bit output: Gated TCK output. When SEL is asserted, DRCK toggles when CAPTURE or
// // SHIFT are asserted.
// .RESET(trst_ni), // 1-bit output: Reset output for TAP controller.
// .RUNTEST(), // 1-bit output: Output asserted when TAP controller is in Run Test/Idle state.
// .SEL(), // 1-bit output: USER instruction active output.
// .SHIFT(), // 1-bit output: SHIFT output from TAP controller.
// .TCK(tck_i), // 1-bit output: Test Clock output. Fabric connection to TAP Clock pin.
// .TDI(td_i), // 1-bit output: Test Data Input (TDI) output from TAP controller.
// .TMS(tms_i), // 1-bit output: Test Mode Select output. Fabric connection to TAP.
// .UPDATE(), // 1-bit output: UPDATE output from TAP controller
// .TDO(td_o) // 1-bit input: Test Data Output (TDO) input for USER function.
// );
// `endif
) would require some more tinkering with openocd.

Is there something in particular that the bare metal and Linux environments don't give that you want from the pk? We haven't had much interest since Linux is working reliably.

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

No branches or pull requests

2 participants