Libre RISC-V Mailing list Archives (accessible via public-inbox)
 help / color / Atom feed
* [libre-riscv-dev] Priority Encoder
@ 2020-05-16 16:17 Yehowshua
  2020-05-16 16:27 ` Luke Kenneth Casson Leighton
  0 siblings, 1 reply; 4+ messages in thread
From: Yehowshua @ 2020-05-16 16:17 UTC (permalink / raw)
  To: Libre-RISCV General Development

Do we have a priority encoder in our codebase?
I didn’t see on in nmutil.

Yehowshua
_______________________________________________
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	[flat|nested] 4+ messages in thread

* Re: [libre-riscv-dev] Priority Encoder
  2020-05-16 16:17 [libre-riscv-dev] Priority Encoder Yehowshua
@ 2020-05-16 16:27 ` Luke Kenneth Casson Leighton
  2020-05-16 16:29   ` Yehowshua
  0 siblings, 1 reply; 4+ messages in thread
From: Luke Kenneth Casson Leighton @ 2020-05-16 16:27 UTC (permalink / raw)
  To: Libre-RISCV General Development

On Saturday, May 16, 2020, Yehowshua <yimmanuel3@gatech.edu> wrote:

> Do we have a priority encoder in our codebase?


nmigen.hdl.coding.

cd nmigen
grep -ri encoder


-- 
---
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	[flat|nested] 4+ messages in thread

* Re: [libre-riscv-dev] Priority Encoder
  2020-05-16 16:27 ` Luke Kenneth Casson Leighton
@ 2020-05-16 16:29   ` Yehowshua
  2020-05-16 17:40     ` Luke Kenneth Casson Leighton
  0 siblings, 1 reply; 4+ messages in thread
From: Yehowshua @ 2020-05-16 16:29 UTC (permalink / raw)
  To: Libre-RISCV General Development

Ah. Thanks.

Yehowshua

_______________________________________________
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	[flat|nested] 4+ messages in thread

* Re: [libre-riscv-dev] Priority Encoder
  2020-05-16 16:29   ` Yehowshua
@ 2020-05-16 17:40     ` Luke Kenneth Casson Leighton
  0 siblings, 0 replies; 4+ messages in thread
From: Luke Kenneth Casson Leighton @ 2020-05-16 17:40 UTC (permalink / raw)
  To: Libre-RISCV General Development

On Saturday, May 16, 2020, Yehowshua <yimmanuel3@gatech.edu> wrote:

> Ah. Thanks.


nmigen Encoder (unary onehot to binary) and Decoder (binary to unary
onehot) back to back is called a PriorityPicker.

do it exactly like that and you end up with significantly suboptimal output
from yosys due to the use of an unnecessary pmux, created by the use of an
Encoder, that yosys cannot in any way optimise out, even if you flatten the
two modules.

this is why nmutil PriorityPicker exists *and is not based on Encoder or
Decoder*.

yosys does a fantastic job of flattening nmutil PriorityPicker down to only
a 3 gate path, even for as high as 16 inputs-outputs.

this is on a par with the kind of gate level optimisation that Mitch Alsup
carries out in his designs.

yes, there was a discussion about that on comp.arch a couple months ago.

l.



-- 
---
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	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-16 16:17 [libre-riscv-dev] Priority Encoder Yehowshua
2020-05-16 16:27 ` Luke Kenneth Casson Leighton
2020-05-16 16:29   ` Yehowshua
2020-05-16 17:40     ` Luke Kenneth Casson Leighton

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