summaryrefslogtreecommitdiff
path: root/riscv/main.sail
AgeCommit message (Collapse)Author
2018-12-20RISVC model is now at https://github.com/rems-project/sail-riscv . Remove it ↵Robert Norton
and tests.
2018-09-06RISCV: Get enough of the RISCV platform into C to run some testsAlasdair Armstrong
2018-08-29C: Fix some issues with tuples as arguments to polymorphic constructorsAlasdair Armstrong
Now all we need to do is make sure the RISC-V builtins are mapped to the correct C functions, and RISC-V in C should work (hopefully). We're still missing some of the functions in sail.c for the mappings so those have to be implemented.
2018-06-11Merge branch 'sail2' into mappingsJon French
(involved some manual tinkering with gitignore, type_check, riscv)
2018-05-23restore original riscv mainJon French
2018-05-21Move the top-level loop from main to riscv_step, but remove elf bits.Prashanth Mundkur
2018-05-21further RISCV mapping: all extant non-compressed instructions doneJon French
2018-05-15Merge branch 'sail2' into mappingsJon French
2018-05-15Fix the ebreak instruction to trap, and remove the now obsolete internal ↵Prashanth Mundkur
exception. This should fix the sbreak test.
2018-05-11...and actually workingJon French
2018-05-10more mappingJon French
2018-05-09Remove unused definitions.Prashanth Mundkur
2018-05-03Fix interrupt dispatch, improve execution logs, cleanup unused bits.Prashanth Mundkur
2018-05-03Simplify the top-level execute loop using the step function.Prashanth Mundkur
2018-05-03Fix up interrupt and exception dispatch.Prashanth Mundkur
2018-05-02Tick cycle counter in execute loop.Prashanth Mundkur
2018-04-26Initial support for faults of reads to physical addresses.Prashanth Mundkur
2018-04-20Add a riscv instruction printer for the execution log.Prashanth Mundkur
2018-04-09Update riscv to use the new system definitions, remove duplicates.Prashanth Mundkur
2018-03-19Fixes to C backend for RISCV-compilationAlasdair Armstrong
Can now compile RISCV. Requires some library tweaks before it'll pass any tests, Also adds hyperlinks to wip latex output
2018-03-07Make union types consistent in the ASTAlasdair Armstrong
Previously union types could have no-argument constructors, for example the option type was previously: union option ('a : Type) = { Some : 'a, None } Now every union constructor must have a type, so option becomes: union option ('a : Type) = { Some : 'a, None : unit } The reason for this is because previously these two different types of constructors where very different in the AST, constructors with arguments were used the E_app AST node, and no-argument constructors used the E_id node. This was particularly awkward, because it meant that E_id nodes could have polymorphic types, i.e. every E_id node that was also a union constructor had to be annotated with a type quantifier, in constrast with all other identifiers that have unquantified types. This became an issue when monomorphising types, because the machinery for figuring out function instantiations can't be applied to identifier nodes. The same story occurs in patterns, where previously unions were split across P_id and P_app nodes - now the P_app node alone is used solely for unions. This is a breaking change because it changes the syntax for union constructors - where as previously option was matched as: function is_none opt = match opt { Some(_) => false, None => true } it is now matched as function is_none opt = match opt { Some(_) => false, None() => true } note that constructor() is syntactic sugar for constructor(()), i.e. a one argument constructor with unit as it's value. This is exactly the same as for functions where a unit-function can be called as f() and not as f(()). (This commit also makes exit() work consistently in the same way) An attempt to pattern match a variable with the same name as a union-constructor now gives an error as a way to guard against mistakes made because of this change. There is probably an argument for supporting the old syntax via some syntactic sugar, as it is slightly prettier that way, but for now I have chosen to keep the implementation as simple as possible. The RISCV spec, ARM spec, and tests have been updated to account for this change. Furthermore the option type can now be included from $SAIL_DIR/lib/ using $include <option.sail>
2018-02-06Add a system initialization function. For now, it merely initializes ↵Prashanth Mundkur
support for RVC in the misa.
2018-02-01badaddr is a misleading name, since it could contain what the PC points to ↵Prashanth Mundkur
for illegal-instruction exceptions. changed to excinfo.
2018-02-01Initial top-level support for compression instructions.Prashanth Mundkur
- introduce the misa register - check the appropriate instruction bits to decide whether it is compressed - check misa.C to decide whether we can execute compressed instructions - add a decodeCompressed function - add two of the most basic RVC instructions: NOP and ILLEGAL
2018-01-29Add some initial exception handling to the riscv execution loop.Prashanth Mundkur
2018-01-29riscv: remove break from main loop and place val spec in prelude.Robert Norton
2018-01-25Extend RISCV main loop with support for tohost interface used by test suite ↵Robert Norton
for terminating the test.
2018-01-25work in progress riscv CSR implementation.Robert Norton