* [libre-riscv-dev] [Bug 186] Create decoder for SOC: Power ISA and RISC-V
From: bugzilla-daemon @ 2020-03-19 6:56 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-186-13@http.bugs.libre-riscv.org/>
http://bugs.libre-riscv.org/show_bug.cgi?id=186
--- Comment #89 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
ok i fixed some dumb off-by-one errors in decode_fieldsn.py and the gas example
works (yay!) am tempted to suggest throwing a ton more random stuff at it.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 186] Create decoder for SOC: Power ISA and RISC-V
From: bugzilla-daemon @ 2020-03-19 3:00 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-186-13@http.bugs.libre-riscv.org/>
http://bugs.libre-riscv.org/show_bug.cgi?id=186
--- Comment #88 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
michael, fired up laptop brielfly when stopped git commited field-index reverse
please check it, should work.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 186] Create decoder for SOC: Power ISA and RISC-V
From: bugzilla-daemon @ 2020-03-19 0:24 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-186-13@http.bugs.libre-riscv.org/>
http://bugs.libre-riscv.org/show_bug.cgi?id=186
--- Comment #87 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Michael Nolan from comment #82)
> Oh I see. It's bit reversing the whole word
yes. that is what width-k-1 is for.
and then for the field which is local that needs to be reversed *back*.
this is what we are missing.
k is into the instruction (0..31)
t is into the FIELD and just to make life rreally interesting it can cover
MULTIPLE fields.
joy.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 186] Create decoder for SOC: Power ISA and RISC-V
From: bugzilla-daemon @ 2020-03-19 0:21 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-186-13@http.bugs.libre-riscv.org/>
http://bugs.libre-riscv.org/show_bug.cgi?id=186
--- Comment #86 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
really like the gnu gas test idea. could you also plan for covering BE as well
as LE?
but... later, we have enough brainmelting going on
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 178] first coriolis2 tutorial, workflow and "test project" page
From: bugzilla-daemon @ 2020-03-18 23:41 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-178-13@http.bugs.libre-riscv.org/>
http://bugs.libre-riscv.org/show_bug.cgi?id=178
--- Comment #215 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Jock Tanner from comment #214)
> (In reply to Luke Kenneth Casson Leighton from comment #213)
> > ok see https://libre-riscv.org/about_us/ create yourself a user-page
> > on the wiki (template one of the existing ones, use mine as i have
> > more "headings"), then put EUR amount in a "pending" section, with
> > the heading "NLNet 2019 Coriolis2 Layout proposal 2019-10-029" and
> > put the date on that as well.
>
> Done.
>
> > the RFP will go in to NLNet once i hear back from them. are you in
> > Europe? if so it's ok to put in small(ish) amounts.
>
> I live in Russia. I have an account in a local bank. I can receive
> international bank transfers. I understand that nonprofit organization can
> not pay bank charges for me. But exactly how terrible those charges are?
we should probably wait until you accumulate arouuund... EUR 1500 minimum,
then. NLnet are asking if they would like to support us, or if they woykd like
to support the banks.
:)
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 217] create a "ring" system which allows pad locations to be specified conveniently
From: bugzilla-daemon @ 2020-03-18 23:39 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-217-13@http.bugs.libre-riscv.org/>
http://bugs.libre-riscv.org/show_bug.cgi?id=217
--- Comment #42 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Jock Tanner from comment #41)
> (In reply to Luke Kenneth Casson Leighton from comment #40)
> > (In reply to Jock Tanner from comment #39)
> > looks great to me. the docstring quality is excellent.
>
> When I enter 3 quotes under a 'def', Pycharm creates a docstring template
> for me. I only have to fill in the human-readable descriptions.
niiice.
> >
> > i did my usual "make myself go over the code by making
> > whitespace cleanups" i find it's a good way to "review" by making my fingers
> > "do" if you know what i mean. you'll need to do a git pull, there.
>
> I see. Your style is valid, but it eats up more space than mine (newline
> after and before parentheses aka 'hanging indent').
i tend to make a new function or use an intermediary variable if that happens.
am not a fan of massive.selfexplanatory.variablenames.and.functionnames.
much better to have a short name and a good comment.
> I think hanging indent
>
> - is better than smaller indent when it comes to cramping things up,
>
> - has a consistent look in regard of other multiline expressions (split
> strings, lists, list/dict comprehensions, et c.)
if you have good reason to use them i.am all in. bear in mind i keep sometimes
EIGHT 80x63 xterms open at once onscreen side by side (now 12 with a 4k screen)
so small functions and the 80 char limit is really important.
> > so the next two things, i think:
> >
> > 1. can you make a function which creates the BLOCKAGE "things"?
> > then call it from add() and sub(). defaults to 2,3,4 however allow
> > it to be parameterisable.
>
> What about the existing 'get_layer()'?
nuts. cant see it. on phone. can you send yrl to gitweb thing?
> > 2. add() and sub() are near-duplicates and to some extent so is alu16.
> > could you make a function which both add() and sub() call, and break
> > out pieces for alu16()? for example, the "find and place" add and sub
>
> I think it's doable. The code indeed is very repetitive.
yes. i cutpaste it in a hurry
> I have two questions about our current setup.
>
> 1. Is it OK that we have separate adder and subtractor?
this is just an experiment, from nmigen alu_hier.py example.
> I think most ALUs
> just negate and add instead of subtract. I think this would use a bit less
> logic, and negation in itself is also a useful operation.
yes. in the "real" alu we have... mmm... not sure, actually. probably -
do me a favour and raise a bugreport as a reminder to look up what rocketchip
does?
> 2. Did we lost 'op' pin?
yes, well spotted :) that should come in at top.
clock on the side just for fits and giggles.
check ringoscillator benchs or grep -r benchs createpin to find examples.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 186] Create decoder for SOC: Power ISA and RISC-V
From: bugzilla-daemon @ 2020-03-18 23:27 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-186-13@http.bugs.libre-riscv.org/>
http://bugs.libre-riscv.org/show_bug.cgi?id=186
--- Comment #85 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
line 32
for t in range(lenself - stop - 1, lenself - start - 1)
except this is wrong because bits are not stepped properly
so it is probably
l = list(range(start, stop, step)
l = l.reverse() # probably
for t in l:
t = len(self) - t - 1
carry on
for the else bit just do the t sub-from-self before lookup, too
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 186] Create decoder for SOC: Power ISA and RISC-V
From: bugzilla-daemon @ 2020-03-18 23:20 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-186-13@http.bugs.libre-riscv.org/>
http://bugs.libre-riscv.org/show_bug.cgi?id=186
--- Comment #84 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Michael Nolan from comment #83)
> (In reply to Luke Kenneth Casson Leighton from comment #81)
> > https://git.libre-riscv.org/?p=soc.git;a=blob;f=src/soc/decoder/
> > power_fieldsn.py;h=a5e03a114ec54d915deb13f20c99e8ab59078dc5;hb=HEAD#l31
> >
> > try subtracting start and end from from len-1, and sign inverting step, at
> > line 31
>
> It's giving a key error because the index (31) isn't in the "dict" (I
> printed out the object and it gave SignalBitRange([(0, 31)]), and I assume
> it treats that as {0: 31}).
>
> What's the purpose of line 1?
> k = OrderedDict.__getitem__(self, t)
>
gets the remapping of what bit you want in the field onto what ACTUAL bit you
want in the instruction.
res.append(self.signal[k]) # reverse-order here
> I think it'd work ok if I just grabbed the bit from the signal directly,
> like so:
> res.append(self.signal[t])
nope.
that will get you bit 0 of the instruction when you request bit 0 ofa **FIELD**
in the instruction.
so, apologies it was reverse the order of t not k
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 178] first coriolis2 tutorial, workflow and "test project" page
From: bugzilla-daemon @ 2020-03-18 22:47 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-178-13@http.bugs.libre-riscv.org/>
http://bugs.libre-riscv.org/show_bug.cgi?id=178
--- Comment #214 from Jock Tanner <tanner.of.kha@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #213)
> ok see https://libre-riscv.org/about_us/ create yourself a user-page
> on the wiki (template one of the existing ones, use mine as i have
> more "headings"), then put EUR amount in a "pending" section, with
> the heading "NLNet 2019 Coriolis2 Layout proposal 2019-10-029" and
> put the date on that as well.
Done.
> the RFP will go in to NLNet once i hear back from them. are you in
> Europe? if so it's ok to put in small(ish) amounts.
I live in Russia. I have an account in a local bank. I can receive
international bank transfers. I understand that nonprofit organization can not
pay bank charges for me. But exactly how terrible those charges are?
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 186] Create decoder for SOC: Power ISA and RISC-V
From: bugzilla-daemon @ 2020-03-18 22:13 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-186-13@http.bugs.libre-riscv.org/>
http://bugs.libre-riscv.org/show_bug.cgi?id=186
--- Comment #83 from Michael Nolan <mtnolan2640@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #81)
> https://git.libre-riscv.org/?p=soc.git;a=blob;f=src/soc/decoder/
> power_fieldsn.py;h=a5e03a114ec54d915deb13f20c99e8ab59078dc5;hb=HEAD#l31
>
> try subtracting start and end from from len-1, and sign inverting step, at
> line 31
It's giving a key error because the index (31) isn't in the "dict" (I printed
out the object and it gave SignalBitRange([(0, 31)]), and I assume it treats
that as {0: 31}).
What's the purpose of line 1?
k = OrderedDict.__getitem__(self, t)
res.append(self.signal[k]) # reverse-order here
I think it'd work ok if I just grabbed the bit from the signal directly, like
so:
res.append(self.signal[t])
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 217] create a "ring" system which allows pad locations to be specified conveniently
From: bugzilla-daemon @ 2020-03-18 22:09 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-217-13@http.bugs.libre-riscv.org/>
http://bugs.libre-riscv.org/show_bug.cgi?id=217
--- Comment #41 from Jock Tanner <tanner.of.kha@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #40)
> (In reply to Jock Tanner from comment #39)
> looks great to me. the docstring quality is excellent.
When I enter 3 quotes under a 'def', Pycharm creates a docstring template for
me. I only have to fill in the human-readable descriptions.
>
> i did my usual "make myself go over the code by making
> whitespace cleanups" i find it's a good way to "review" by making my fingers
> "do" if you know what i mean. you'll need to do a git pull, there.
I see. Your style is valid, but it eats up more space than mine (newline after
and before parentheses aka 'hanging indent'). I think hanging indent
- is better than smaller indent when it comes to cramping things up,
- has a consistent look in regard of other multiline expressions (split
strings, lists, list/dict comprehensions, et c.)
> so the next two things, i think:
>
> 1. can you make a function which creates the BLOCKAGE "things"?
> then call it from add() and sub(). defaults to 2,3,4 however allow
> it to be parameterisable.
What about the existing 'get_layer()'?
> 2. add() and sub() are near-duplicates and to some extent so is alu16.
> could you make a function which both add() and sub() call, and break
> out pieces for alu16()? for example, the "find and place" add and sub
I think it's doable. The code indeed is very repetitive.
I have two questions about our current setup.
1. Is it OK that we have separate adder and subtractor? I think most ALUs just
negate and add instead of subtract. I think this would use a bit less logic,
and negation in itself is also a useful operation.
2. Did we lost 'op' pin?
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 186] Create decoder for SOC: Power ISA and RISC-V
From: bugzilla-daemon @ 2020-03-18 21:38 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-186-13@http.bugs.libre-riscv.org/>
http://bugs.libre-riscv.org/show_bug.cgi?id=186
--- Comment #82 from Michael Nolan <mtnolan2640@gmail.com> ---
(In reply to Michael Nolan from comment #79)
> Ok, so I've got an instruction, for example:
> add 4, 16, 7
> which gets assembled to:
> 0x7c903a14
> or:
> value: 0111 1100 1001 0000 0011 1010 0001 0100
> field: oooo oott ttta aaaa mmm mmmm mmm
> number: 0123 4567 8901 2345 6789 0123 4567 8901
>
> o: Opcode = 31
> m: Opcode minor = 266/0b0100001010 - ADD - form XO
> t: RT = 0b00100 = 4
>
> This all looks right, right?
>
> Somehow the decoder is getting write_reg=8 (write_reg should be RT) out of
> this, and I'm not sure how. 0b00100 is 4 regardless of bit ordering...
>
> I double checked, and pdecoder.dec.RT is
> SignalBitRange([(0, 6), (1, 7), (2, 8), (3, 9), (4, 10)])
> which seems right. Any idea of where to look?
Oh I see. It's bit reversing the whole word
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 186] Create decoder for SOC: Power ISA and RISC-V
From: bugzilla-daemon @ 2020-03-18 21:28 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-186-13@http.bugs.libre-riscv.org/>
http://bugs.libre-riscv.org/show_bug.cgi?id=186
--- Comment #81 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
https://git.libre-riscv.org/?p=soc.git;a=blob;f=src/soc/decoder/power_fieldsn.py;h=a5e03a114ec54d915deb13f20c99e8ab59078dc5;hb=HEAD#l31
try subtracting start and end from from len-1, and sign inverting step, at line
31
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 186] Create decoder for SOC: Power ISA and RISC-V
From: bugzilla-daemon @ 2020-03-18 21:23 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-186-13@http.bugs.libre-riscv.org/>
http://bugs.libre-riscv.org/show_bug.cgi?id=186
--- Comment #80 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
rright. ok. so i think, to "fix" thus, in SignalBitRange, the slice indices -
start, end (and direction) all need to be reversed *as well*.
oink.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 186] Create decoder for SOC: Power ISA and RISC-V
From: bugzilla-daemon @ 2020-03-18 20:51 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-186-13@http.bugs.libre-riscv.org/>
http://bugs.libre-riscv.org/show_bug.cgi?id=186
--- Comment #79 from Michael Nolan <mtnolan2640@gmail.com> ---
Ok, so I've got an instruction, for example:
add 4, 16, 7
which gets assembled to:
0x7c903a14
or:
value: 0111 1100 1001 0000 0011 1010 0001 0100
field: oooo oott ttta aaaa mmm mmmm mmm
number: 0123 4567 8901 2345 6789 0123 4567 8901
o: Opcode = 31
m: Opcode minor = 266/0b0100001010 - ADD - form XO
t: RT = 0b00100 = 4
This all looks right, right?
Somehow the decoder is getting write_reg=8 (write_reg should be RT) out of
this, and I'm not sure how. 0b00100 is 4 regardless of bit ordering...
I double checked, and pdecoder.dec.RT is
SignalBitRange([(0, 6), (1, 7), (2, 8), (3, 9), (4, 10)])
which seems right. Any idea of where to look?
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 186] Create decoder for SOC: Power ISA and RISC-V
From: bugzilla-daemon @ 2020-03-18 19:31 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-186-13@http.bugs.libre-riscv.org/>
http://bugs.libre-riscv.org/show_bug.cgi?id=186
--- Comment #78 from Jacob Lifshay <programmerjake@gmail.com> ---
In any case, what matters is that the instructions are decoded correctly.
Some example disassembly from objdump (edited to convert decimal to hex):
test.o: file format elf64-powerpcle
Disassembly of section .text:
0000000000000000 <f>:
0: 01 00 20 3d addis r9,0,1
4: 45 23 29 61 ori r9,r9,0x2345
8: d2 49 84 7c mulld r4,r4,r9
c: d2 19 64 7c mulld r3,r4,r3
10: 20 00 80 4e bclr 20,lt
Note how the immediate values for ori and addis are not bit-reversed (they are
in little-endian byte order, though). I haven't checked, but I'm quite sure the
register fields are also not bit-reversed.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 186] Create decoder for SOC: Power ISA and RISC-V
From: bugzilla-daemon @ 2020-03-18 19:27 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-186-13@http.bugs.libre-riscv.org/>
http://bugs.libre-riscv.org/show_bug.cgi?id=186
--- Comment #77 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Jacob Lifshay from comment #76)
> From what I understand, it's just the way bits are numbered that's reversed,
> the MSB is still the MSB. So, just the field order is reversed, individual
> fields are not since they are treated as a multi-bit number and the MSB is
> still the MSB (and other bits also keep their place in a number).
ngggh mindbender. so by doing width-idx-1 it has reversed the bitorder of each
bit in the field.
ye gods.
can you and michael take a look at this properly, suggest reviewing the pearpc
and gem5 source code, and chiselwatt.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* Re: [libre-riscv-dev] [Bug 186] Create decoder for SOC: Power ISA and RISC-V
From: Immanuel, Yehowshua U @ 2020-03-18 18:23 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <CAPweEDwyHqsj2047jdZRyZ+miWcMSnhcd3dCOsS9QgRKE9w1Bg@mail.gmail.com>
> howevrr i dont know what "downto" means in vhdl.
VHDL: 8 downto 0
Verilog: 8:0
VHDL is really weird...
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* Re: [libre-riscv-dev] [Bug 186] Create decoder for SOC: Power ISA and RISC-V
From: Luke Kenneth Casson Leighton @ 2020-03-18 18:22 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <bug-186-13-QcaOut2JK4@http.bugs.libre-riscv.org/>
look at decoder1.vhdl, entire 32 bit numbers definitely reversed compared
to numbering in PDF.
howevrr i dont know what "downto" means in vhdl.
On Wednesday, March 18, 2020, <bugzilla-daemon@libre-riscv.org> wrote:
> http://bugs.libre-riscv.org/show_bug.cgi?id=186
>
> --- Comment #76 from Jacob Lifshay <programmerjake@gmail.com> ---
> From what I understand, it's just the way bits are numbered that's
> reversed,
> the MSB is still the MSB. So, just the field order is reversed, individual
> fields are not since they are treated as a multi-bit number and the MSB is
> still the MSB (and other bits also keep their place in a number).
>
> Example:
> Power bit order:
> bit # 0 1 2 3 4 5 6 7
> 0 1 0 1 1 1 1 0
>
> fields: A:0-3, B:4, C:5-7
>
> field A 0-3: 0101 = 5
> field B 4: 1 = 1
> field C 5-7: 110 = 6
>
> switched bit numbering order:
>
> nmigen/RISC-V bit order:
> bit # 7 6 5 4 3 2 1 0
> 0 1 0 1 1 1 1 0
>
> fields: C:0-2, B:3, A:4-7
>
> fields have same value but different order:
> field C 0-2: 110 = 6
> field B 3: 1 = 1
> field A 4-7: 0101 = 5
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
> _______________________________________________
> libre-riscv-dev mailing list
> libre-riscv-dev@lists.libre-riscv.org
> http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
>
--
---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 186] Create decoder for SOC: Power ISA and RISC-V
From: bugzilla-daemon @ 2020-03-18 17:14 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-186-13@http.bugs.libre-riscv.org/>
http://bugs.libre-riscv.org/show_bug.cgi?id=186
--- Comment #76 from Jacob Lifshay <programmerjake@gmail.com> ---
From what I understand, it's just the way bits are numbered that's reversed,
the MSB is still the MSB. So, just the field order is reversed, individual
fields are not since they are treated as a multi-bit number and the MSB is
still the MSB (and other bits also keep their place in a number).
Example:
Power bit order:
bit # 0 1 2 3 4 5 6 7
0 1 0 1 1 1 1 0
fields: A:0-3, B:4, C:5-7
field A 0-3: 0101 = 5
field B 4: 1 = 1
field C 5-7: 110 = 6
switched bit numbering order:
nmigen/RISC-V bit order:
bit # 7 6 5 4 3 2 1 0
0 1 0 1 1 1 1 0
fields: C:0-2, B:3, A:4-7
fields have same value but different order:
field C 0-2: 110 = 6
field B 3: 1 = 1
field A 4-7: 0101 = 5
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] travelling today, 18mar2020 -> 19mar2020
From: Luke Kenneth Casson Leighton @ 2020-03-18 16:27 UTC (permalink / raw)
To: Libre-RISCV General Development
hi folks i'm packing up, travelling overnight and will be "set up"
again tomorrow night.
friday i have drive to gatwick in the afternoon and pick up my partner
and daughter.
i'll have the 3G/4G/WIFI router plus smartphone for sporadic and
obtuse responses.
l.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 186] Create decoder for SOC: Power ISA and RISC-V
From: bugzilla-daemon @ 2020-03-18 16:12 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-186-13@http.bugs.libre-riscv.org/>
http://bugs.libre-riscv.org/show_bug.cgi?id=186
--- Comment #75 from Michael Nolan <mtnolan2640@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #74)
> (In reply to Michael Nolan from comment #73)
> > Huh, apparently the register numbers need to be bit reversed in our decoder.
>
> eeeverything needs to be bit-reversed. see 1.3.2 "notation"
Well yes... But I thought we did that already, evidently not.
> if you can double-check that, it would be really good. i tend
> to get these things wrong.
Ok
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 186] Create decoder for SOC: Power ISA and RISC-V
From: bugzilla-daemon @ 2020-03-18 16:07 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-186-13@http.bugs.libre-riscv.org/>
http://bugs.libre-riscv.org/show_bug.cgi?id=186
--- Comment #74 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Michael Nolan from comment #73)
> Huh, apparently the register numbers need to be bit reversed in our decoder.
eeeverything needs to be bit-reversed. see 1.3.2 "notation"
- Bits in instructions, fields, and bit strings are
numbered from left to right, starting with bit 0
- The leftmost bit of a sequence of bits is the
most significant bit of the sequence.
*gibber*.
so i put the reversing into.. err... where was it...
SignalBitRange.__getitem__() - you can see (i just commented it)
if you can double-check that, it would be really good. i tend
to get these things wrong.
ultimately, we'll find out pretty damn quick when it comes to
executing actual code.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 186] Create decoder for SOC: Power ISA and RISC-V
From: bugzilla-daemon @ 2020-03-18 15:49 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-186-13@http.bugs.libre-riscv.org/>
http://bugs.libre-riscv.org/show_bug.cgi?id=186
--- Comment #73 from Michael Nolan <mtnolan2640@gmail.com> ---
Huh, apparently the register numbers need to be bit reversed in our decoder.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 261] power_enums.py to read SPRs from sprs.csv
From: bugzilla-daemon @ 2020-03-18 15:46 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-261-13@http.bugs.libre-riscv.org/>
http://bugs.libre-riscv.org/show_bug.cgi?id=261
--- Comment #5 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Michael Nolan from comment #4)
> Oh no!
:) ehh it was fiiine
> I'm thinking I could either make the enum value a namedstruct/SPR object
> that contains the length/privelages, or make a separate dict of
> structs/objects for that information. Thoughts on which way to go?
hmmm... separate doesn't make a lot of sense, people might think they're
somehow not related.
> Side note, why would they make them duplicate anyhow? That seems somewhat
> nutty.
sigh i know, welcome to an "organically-grown" ISA. they should have put a
prefix "H" or "S" in front of them, with "U" for "userspace".
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
page: next prev latest
Libre RISC-V Mailing list Archives (accessible via public-inbox)
Archives are clonable: git clone --mirror https://inbox.libre-soc.org/libre-riscv-dev
Example config snippet for mirrors
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git