alastairreid / mra_tools Goto Github PK
View Code? Open in Web Editor NEWTools to process ARM's Machine Readable Architecture Specification
License: BSD 3-Clause "New" or "Revised" License
Tools to process ARM's Machine Readable Architecture Specification
License: BSD 3-Clause "New" or "Revised" License
After building regs.asl, PMCEID's fields look odd,
$ grep PMCEID[0-1]_EL0 regs.asl
__register 64 { 63:32 IDhi, 63:32 ID } PMCEID1_EL0;
__register 64 { 31:0 IDhi, 31:0 ID } PMCEID0_EL0;
it seems to me like this should be { 63:32 IDhi, 31:0 ID } for both,
like in the xml field_lsb and field_msb are
but the script generating regs.asl is interpreting the names "IDhi[62:32]" and "IDhi[31:0]" as bit slices,
but the name and the fields, do not appear to be in harmony. I can imagine situations in which a simulator might not notice such an issue unless tests are interleaving changes to both fields.
Is this working as intended?
Hi,
This problem is more about the specification than the parsing tools. Is a standalone slice like in <X, Y>
valid ASL? The specification says nothing about that case but the SHA1C instruction has pseudocode containing <Y, X> = ROL(Y:X, 32);
. To me that seems like the person meant to write (Y, X) = ROL(Y:X, 32);
or Y:X = ROL(Y:X, 32);
(if concatenations are assignable).
The other problem is that the new slice syntax overlaps with the array-style function syntax. A free token that comes to my mind would be <<<
and >>>
or {
and }
.
PS: If this question is off-topic feel free to close it and/or direct me to the appropriate place to ask the question.
This function (the second one in t.asl) is failing on the last line
boolean HaveEL(bits(2) el)
if el IN {EL1,EL0} then
return TRUE; // EL1 and EL0 must exist
return boolean IMPLEMENTATION_DEFINED;
I think the problem is the handling of nested statements in the if-statement
Hi,
I have been trying to understand how to use the scripts. - mainly instr2asl.py to no avail.
I'm mainly interested in understanding and possibly converting the ASL to C or python...
for example, I have this code: - can I use the script to decode it?
len = HighestSetBit(immN:NOT(imms));
bits(6)` levels;
levels = ZeroExtend(Ones(len), 6);
Many thanks
Hoss
In ASL, "ab+cd" should parse as "(ab)+(cd)".
This is not yet implemented.
This will become more of a problem once an AST is generated.
$ make all
bin/instrs2asl.py v8.2/ISA_v82A_AArch32_xml_00bet3.2 v8.2/ISA_v82A_A64_xml_00bet3.2
Traceback (most recent call last):
File "bin/instrs2asl.py", line 404, in
sys.exit(main())
File "bin/instrs2asl.py", line 319, in main
(shared,names) = readShared([ f for d in args.dir for f in glob.glob(os.path.join(d, 'shared_pseudocode.xml'))])
File "bin/instrs2asl.py", line 131, in readShared
r.defs.add(m[2])
TypeError: '_sre.SRE_Match' object is not subscriptable
make: *** [arch.asl] Error 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.