Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory ReadPort and WritePort are broken for negedge clockdomains #611

Closed
anuejn opened this issue May 18, 2021 · 0 comments · Fixed by #1039
Closed

Memory ReadPort and WritePort are broken for negedge clockdomains #611

anuejn opened this issue May 18, 2021 · 0 comments · Fixed by #1039

Comments

@anuejn
Copy link
Contributor

anuejn commented May 18, 2021

Currently, ReadPort and WritePort do not respect the clock polarity of the domain. This makes it impossible to use Memory with negedge domains.

see:
https://github.com/nmigen/nmigen/blob/d09dedfb485ee94cb492ef8e44ebb87260892532/nmigen/hdl/mem.py#L281 https://github.com/nmigen/nmigen/blob/d09dedfb485ee94cb492ef8e44ebb87260892532/nmigen/hdl/mem.py#L177

anuejn added a commit to apertus-open-source-cinema/naps that referenced this issue May 18, 2021
a bug in nmigen prevents memory from being used in combination with
negedge clock domains as used in the JTAG code
(amaranth-lang/amaranth#611).
This is fixed now by using a posedge domain for JTAG and manually
invevrting the clock.
whitequark added a commit to whitequark/amaranth that referenced this issue Nov 25, 2023
The new intermediate representation allows performing global analyses
on Amaranth code without lowering it to another representation such as
RTLIL.

This commit also changes the RTLIL builder to use the new IR. This
results in several improvements:
- Memories with negedge clocks are now supported (fixes amaranth-lang#611).
- Reuse of the same `Value` in multiple expressions is now emitted more
  efficiently (fixes amaranth-lang#787).
- Complex expressions on the right-hand side of an assignment are now
  emitted with less use of Python stack space (fixes amaranth-lang#839). WIP
- Complex expressions on the left-hand side of an assignment are now
  emitted more efficiently.

Co-authored-by: Wanda <wanda@phinode.net>
whitequark added a commit to whitequark/amaranth that referenced this issue Nov 25, 2023
The new intermediate representation allows performing global analyses
on Amaranth code without lowering it to another representation such as
RTLIL.

This commit also changes the RTLIL builder to use the new IR. This
results in several improvements:
- Memories with negedge clocks are now supported (fixes amaranth-lang#611).
- Reuse of the same `Value` in multiple expressions is now emitted more
  efficiently (fixes amaranth-lang#787).
- Complex expressions on the right-hand side of an assignment are now
  emitted with less use of Python stack space (fixes amaranth-lang#839). WIP
- Complex expressions on the left-hand side of an assignment are now
  emitted more efficiently.

Co-authored-by: Wanda <wanda@phinode.net>
whitequark added a commit to whitequark/amaranth that referenced this issue Dec 15, 2023
The new intermediate representation allows performing global analyses
on Amaranth code without lowering it to another representation such as
RTLIL.

This commit also changes the RTLIL builder to use the new IR. This
results in several improvements:
- Memories with negedge clocks are now supported (fixes amaranth-lang#611).
- Reuse of the same `Value` in multiple expressions is now emitted more
  efficiently (fixes amaranth-lang#787).
- Complex expressions on the right-hand side of an assignment are now
  emitted with less use of Python stack space (fixes amaranth-lang#839). WIP
- Complex expressions on the left-hand side of an assignment are now
  emitted more efficiently.

Co-authored-by: Wanda <wanda@phinode.net>
wanda-phi added a commit to wanda-phi/amaranth that referenced this issue Jan 16, 2024
whitequark added a commit to whitequark/amaranth that referenced this issue Jan 20, 2024
The new intermediate representation allows performing global analyses
on Amaranth code without lowering it to another representation such as
RTLIL.

This commit also changes the RTLIL builder to use the new IR. This
results in several improvements:
- Memories with negedge clocks are now supported (fixes amaranth-lang#611).
- Reuse of the same `Value` in multiple expressions is now emitted more
  efficiently (fixes amaranth-lang#787).
- Complex expressions on the right-hand side of an assignment are now
  emitted with less use of Python stack space (fixes amaranth-lang#839). WIP
- Complex expressions on the left-hand side of an assignment are now
  emitted more efficiently.

Co-authored-by: Wanda <wanda@phinode.net>
whitequark added a commit to whitequark/amaranth that referenced this issue Jan 31, 2024
The new intermediate representation allows performing global analyses
on Amaranth code without lowering it to another representation such as
RTLIL.

This commit also changes the RTLIL builder to use the new IR. This
results in several improvements:
- Memories with negedge clocks are now supported (fixes amaranth-lang#611).
- Reuse of the same `Value` in multiple expressions is now emitted more
  efficiently (fixes amaranth-lang#787).
- Complex expressions on the right-hand side of an assignment are now
  emitted with less use of Python stack space (fixes amaranth-lang#839). WIP
- Complex expressions on the left-hand side of an assignment are now
  emitted more efficiently.

Co-authored-by: Wanda <wanda@phinode.net>
whitequark added a commit to whitequark/amaranth that referenced this issue Jan 31, 2024
The new intermediate representation allows performing global analyses
on Amaranth code without lowering it to another representation such as
RTLIL.

This commit also changes the RTLIL builder to use the new IR. This
results in several improvements:
- Memories with negedge clocks are now supported (fixes amaranth-lang#611).
- Reuse of the same `Value` in multiple expressions is now emitted more
  efficiently (fixes amaranth-lang#787).
- Complex expressions on the right-hand side of an assignment are now
  emitted with less use of Python stack space (fixes amaranth-lang#839). WIP
- Complex expressions on the left-hand side of an assignment are now
  emitted more efficiently.

Co-authored-by: Wanda <wanda@phinode.net>
whitequark added a commit to whitequark/amaranth that referenced this issue Feb 4, 2024
The new intermediate representation allows performing global analyses
on Amaranth code without lowering it to another representation such as
RTLIL.

This commit also changes the RTLIL builder to use the new IR. This
results in several improvements:
- Memories with negedge clocks are now supported (fixes amaranth-lang#611).
- Reuse of the same `Value` in multiple expressions is now emitted more
  efficiently (fixes amaranth-lang#787).
- Complex expressions on the right-hand side of an assignment are now
  emitted with less use of Python stack space (fixes amaranth-lang#839). WIP
- Complex expressions on the left-hand side of an assignment are now
  emitted more efficiently.

Co-authored-by: Wanda <wanda@phinode.net>
whitequark added a commit to whitequark/amaranth that referenced this issue Feb 5, 2024
The new intermediate representation allows performing global analyses
on Amaranth code without lowering it to another representation such as
RTLIL.

This commit also changes the RTLIL builder to use the new IR. This
results in several improvements:
- Memories with negedge clocks are now supported (fixes amaranth-lang#611).
- Reuse of the same `Value` in multiple expressions is now emitted more
  efficiently (fixes amaranth-lang#787).
- Complex expressions on the right-hand side of an assignment are now
  emitted with less use of Python stack space (fixes amaranth-lang#839). WIP
- Complex expressions on the left-hand side of an assignment are now
  emitted more efficiently.

Co-authored-by: Wanda <wanda@phinode.net>
whitequark added a commit to whitequark/amaranth that referenced this issue Feb 10, 2024
The new intermediate representation allows performing global analyses
on Amaranth code without lowering it to another representation such as
RTLIL.

This commit also changes the RTLIL builder to use the new IR. This
results in several improvements:
- Memories with negedge clocks are now supported (fixes amaranth-lang#611).
- Reuse of the same `Value` in multiple expressions is now emitted more
  efficiently (fixes amaranth-lang#787).
- Complex expressions on the right-hand side of an assignment are now
  emitted with less use of Python stack space (fixes amaranth-lang#839). WIP
- Complex expressions on the left-hand side of an assignment are now
  emitted more efficiently.

Co-authored-by: Wanda <wanda@phinode.net>
whitequark added a commit to whitequark/amaranth that referenced this issue Feb 11, 2024
The new intermediate representation allows performing global analyses
on Amaranth code without lowering it to another representation such as
RTLIL.

This commit also changes the RTLIL builder to use the new IR. This
results in several improvements:
- Memories with negedge clocks are now supported (fixes amaranth-lang#611).
- Reuse of the same `Value` in multiple expressions is now emitted more
  efficiently (fixes amaranth-lang#787).
- Complex expressions on the right-hand side of an assignment are now
  emitted with less use of Python stack space (fixes amaranth-lang#839). WIP
- Complex expressions on the left-hand side of an assignment are now
  emitted more efficiently.

Co-authored-by: Wanda <wanda@phinode.net>
whitequark added a commit to whitequark/amaranth that referenced this issue Feb 11, 2024
The new intermediate representation allows performing global analyses
on Amaranth code without lowering it to another representation such as
RTLIL.

This commit also changes the RTLIL builder to use the new IR. This
results in several improvements:
- Memories with negedge clocks are now supported (fixes amaranth-lang#611).
- Reuse of the same `Value` in multiple expressions is now emitted more
  efficiently (fixes amaranth-lang#787).
- Complex expressions on the right-hand side of an assignment are now
  emitted with less use of Python stack space (fixes amaranth-lang#839). WIP
- Complex expressions on the left-hand side of an assignment are now
  emitted more efficiently.

Co-authored-by: Wanda <wanda@phinode.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants