summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-06-26Fix duplicate riscv mem-ea, spotted by Jon French.Prashanth Mundkur
2018-06-26Add configuration registers so __SetConfig ASL can be translatedAlasdair Armstrong
Registers can now be marked as configuration registers, for example: register configuration CFG_RVBAR = 0x1300000 They work like ordinary registers except they can only be set by functions with the 'configuration' effect and have no effect when read. They also have an initialiser, like a let-binding. Internally there is a new reg_dec constructor DEC_config. They are intended to represent configuration parameters for the model, which can change between runs, but don't change during execution. Currently they'll only work when compiled to C. Internally registers can now have custom effects for reads and writes rather than just rreg and wreg, so the type signatures of Env.add_register and Env.get_register have changed, as well as the Register lvar, so in the type checker we now write: Env.add_register id read_effect write_effect typ rather than Env.add_register id typ For the corresponding change to ASL parser there's a function is_config in asl_to_sail.ml which controls what becomes a configuration register for ARM. Some things we have to keep as let-bindings because Sail can't handle them changing at runtime - e.g. the length of vectors in other top-level definitions. Luckily __SetConfig doesn't (yet) try to change those options. Together these changes allow us to translate the ASL __SetConfig function, which means we should get command-line option compatibility with ArchEx for running the ARM conformance tests.
2018-06-26Main: further refinement of execution cycleAlastair Reid
Mostly improving error messages
2018-06-26Prelude: as received from AlasdairAlastair Reid
2018-06-26Main: attempt to capture AArch64 execution cycleAlastair Reid
2018-06-26mips: fix duplication of cycle_count call that arose due to git merge.Robert Norton
2018-06-26mips: comment out printing of EXCEPTION on every ISA exception.Robert Norton
2018-06-26turn on warnings when compiling mips c then dial back ones that are ↵Robert Norton
triggered by generated code (probably false positives). Fix some warnings in rts.c
2018-06-26RTS: implement sleep primitivesAlastair Reid
Note that an alternative implementation choice is just to implement them as SAIL functions manipulating a global variable. Not sure which is better.
2018-06-26RTS: stub support for -C command line optionAlastair Reid
2018-06-26ELF: Restore error messages in ELF readerAlastair Reid
2018-06-26In guarded pattern rewriting, irrefutable patterns subsume wildcardsBrian Campbell
Necessary to prevent redundant clauses that Coq will reject (There's still a problem if you use a variable rather than a wildcard, see the test)
2018-06-26In elf_loader don't attempt to convert paddr to int64 because on MIPS it is ↵Robert Norton
quite likely to exceed representable range of signed 64-bit integer (e.g. address starting 0x9...). Also make clear which values are displayed in hex vs. decimal.
2018-06-25Add a riscv platform parameter to control trapping to M-mode on misaligned ↵Prashanth Mundkur
access, and a cli option to control it.
2018-06-25Increment the riscv trace step counter only when instructions are executed.Prashanth Mundkur
2018-06-25Hook in the missed misa legalizer.Prashanth Mundkur
2018-06-25Fix riscv interrupt pending check to handle implicit enabling at lower ↵Prashanth Mundkur
privileges. Also fix timer threshold comparison to be <= instead of <.
2018-06-25Make sstatus.UXL legalization match spike for now. Leave a fixme to make ↵Prashanth Mundkur
this a platform setting.
2018-06-25Fix a missed fixme for the sstatus view of mstatus.Prashanth Mundkur
2018-06-25Fix tracecmp for spike's recursive calls for sie/sip/sstatus csr writes.Prashanth Mundkur
2018-06-25Check for variables in disjointness checkThomas Bauereiss
2018-06-25Support bitlist representation in Sail2_stringThomas Bauereiss
2018-06-25Fix a bug in pattern guard rewritingThomas Bauereiss
Remember and use fallthrough clauses instead of dropping them when the last clause in a group has a guard
2018-06-25Coq: add typeclass based comparison, and instantiate for enumsBrian Campbell
2018-06-25Coq: automatic cast introductionBrian Campbell
2018-06-25Use getopt rather than argp for Mac compatibility in C runtimeAlasdair Armstrong
Also further tweaks to Sail library for C and include sail lib files for tracing
2018-06-25add device tree file for mips.Robert Norton
2018-06-25mips: add optional tracing of register writes (commented out).Robert Norton
2018-06-25flush stdout after putchar for terminal emulation purposes.Robert Norton
2018-06-25Fix bugs in mips ldl/ldr that were probably introduced in porting to sail2.Robert Norton
2018-06-23Add clock tick checks to the riscv tracecmp tool.Prashanth Mundkur
2018-06-23Fix a missing check for interrupt dispatch when riscv clint registers are ↵Prashanth Mundkur
written.
2018-06-23Split Sail->ANF translation into its own fileAlasdair
Refactor the C compilation process by moving out the conversion to A-normal form into its own file. Also make the A-normal form AST parameterised by the type of the types annotating it. The idea being we can have a typ aexp -> ctyp aexp translation, converting to low-level types at a slightly higher level before mapping into our low-level IR. This would fix some issues we have where the type of variables change due to flow typing, because we could map the sail types to low-level types in the ANF ast where we still have some knowledge about the structure of the original Sail.
2018-06-22Make riscv pte dirty-bit update handling configurable via a platform cli option.Prashanth Mundkur
Fix a redundant clock tick.
2018-06-22Some more riscv trace log tweaking for spike compatibility.Prashanth Mundkur
2018-06-22Add cli options to riscv simulator to dump platform device-tree info.Prashanth Mundkur
2018-06-22Fix Lem build of MIPS/CHERIThomas Bauereiss
2018-06-22Add a simple trace log comparison tool for riscv vs. a patched spike.Prashanth Mundkur
2018-06-22Fix up constraints in OCaml reg_ref testBrian Campbell
2018-06-22Add current state of mips_extras.vBrian Campbell
2018-06-22Precise bitvector subrange functions for Coq.Brian Campbell
Also fix the constraints in the standard prelude files, add a couple of useful cast rewriting lemmas.
2018-06-22Fix bug in elf_loader: zero memory when segment memsz exceeds size.Prashanth Mundkur
2018-06-22More trace log tweaks.Prashanth Mundkur
2018-06-22Add bitvector size constraints in MIPSBrian Campbell
2018-06-22Add coq builtins for MIPSBrian Campbell
2018-06-22Add coq generation rule for mipsBrian Campbell
2018-06-22Coq: use simple forms for simple pattern matches in E_internal_letBrian Campbell
2018-06-22Coq: library updates, esp extending bitvector multiplies, UndefinedBrian Campbell
2018-06-22Coq: project away range types in comparisonsBrian Campbell
2018-06-22build mips and mips_c when running tests.Robert Norton