Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 10:15

    kleinai on dev

    Fix system verilog RTL merge Add RTL paths to generated list… Use hash set to build oneFilePe… and 2 more (compare)

  • 10:15
    kleinai closed #810
  • 10:15
    kleinai commented #810
  • 09:29
    Readon commented #813
  • 08:19
    Dolu1990 commented #815
  • 08:19

    Dolu1990 on dev

    avoid the wreduce process of yo… Add switch for wire reducing of… turn off wire reduce to compare… and 1 more (compare)

  • 08:19
    Dolu1990 closed #815
  • 08:15
    Dolu1990 commented #813
  • 08:04

    Dolu1990 on dev

    verfiy stream counter by formal… fix missing import of funsuite. reduce check condition to minim… and 12 more (compare)

  • 08:04
    Dolu1990 closed #808
  • 08:04
    Dolu1990 commented #808
  • 08:03
    Dolu1990 commented #810
  • Aug 07 19:08
    kleinai synchronize #791
  • Aug 07 16:05
    Readon opened #815
  • Aug 06 23:04
    dokleina synchronize #814
  • Aug 06 20:54
    dokleina opened #814
  • Aug 05 15:49
    Readon edited #813
  • Aug 05 15:49
    Readon opened #813
  • Aug 05 09:23
    Dolu1990 commented #810
  • Aug 05 01:14
    kleinai opened #812
saahm
@saahm
Auswahl_054.png
AHHHHH I GOT IT!
package mylib.duplicatecase

import spinal.core._
import spinal.lib._

import spinal.sim._
import spinal.core.sim._

object MiaoCode {
    def F4_FOO    = M"0000"
    def F4_BAR    = M"0001"
    def F4_MIAU   = M"0010"
    def F4_MOO    = M"0011"
    def F4_WOOF   = M"0100"
}
object MooCode {
    def F4_FOOBAR = M"0000"
    def F4_BARFOO = M"0001"
}

object FooEnumType extends SpinalEnum{
  val undef, fooFoo, fooBar, fooMiau, barFoo, barBar, barMiau = newElement()
}

//Hardware definition
class Bar extends Component {
    val io = new Bundle {
        var myIn = in Bits(5 bits)
        var myFoo = out(FooEnumType())
        val myOut1 = out Bool()
        val barFoo = out Bool()
    }

    val op = Bits(4 bits)
    op := io.myIn(3 downto 0)

    io.myOut1 := False
    io.barFoo := False
    import MooCode._, MiaoCode._
    switch(op){
        is(F4_FOO, F4_FOOBAR){
            io.myFoo := FooEnumType.fooBar
            io.myOut1 := True
        }
        is(F4_MIAU){
            io.myFoo := FooEnumType.fooMiau
        }
        default{
            io.myFoo := FooEnumType.barMiau
            io.barFoo := True
        }
    }

}

object MyBarSim {
  def main(args: Array[String]) {
    SimConfig.withWave.doSim(new Bar){dut =>
      //Fork a process to generate the reset and the clock on the dut
      // dut.clockDomain.forkStimulus(period = 10)

      //Wait a rising edge on the clock
      // dut.clockDomain.waitRisingEdge()
      sleep(1)

    }
  }
}
object MyBarVerilog {
  def main(args: Array[String]) {
    SpinalConfig(
      targetDirectory = "rtl/"
      ).generateVerilog(new Bar)
      .printPruned()
  }
}
so generating the Verilog is fine.
when you want to simulate and then it compiles it with verilator it detects the CASEOVERLAP
that only works if the constants are "M" not "B" (so mask)
With B instead of M for the CodeConstant objects it will case a SpinalHDL error for unreachable IS statement
with M it will cause CASEOVERLAP when simulating, but generating the code is fine
In spinal 1.7 it causes that for M, in 1.4 it was fine to be generated like that
saahm
@saahm
i think already in 1.5 it caused the caseoverlap error to happen
for the actual circuit its irrelevant if the switch case has the samecase twice there no? I'm not sure I think verilator only gives a warning because its bad style. But if its defined through constants it helps the readbility in my opinion
Dolu1990
@Dolu1990
@saahm Which version of verilator ?
Can you open a github issue ^^ ?
Ahhh F4_FOO, F4_FOOBAR are both 0
so yes there is a overlap
I think the "With B instead of M for the CodeConstant objects it will case a SpinalHDL error for unreachable IS statement" message need to be improved for that precise case and be instead pointing that there is two time the same constant in the same "is(xxx, yyy)"
saahm
@saahm
I will create an issue for it surely
Verilator 4.107 devel rev v4.106-62-g82d8fe0c
Dolu1990
@Dolu1990
Hmmm
ok ^^
saahm
@saahm
#811 contains it now
Dolu1990
@Dolu1990
thanks ^
^^
saahm
@saahm
glad to help
卢浩
@lh201430
Why does win11 not support simulation
Or is there something wrong with my environment setup?
Dolu1990
@Dolu1990
Which version of SpinalHDL are you on ?
@lh201430
卢浩
@lh201430
1.7.1 1.7.2 (All cannot be simulated),My classmate's win11 doesn't work either.
@Dolu1990
Dolu1990
@Dolu1990
what error does it repport ?
卢浩
@lh201430
image.png
image.png
Both ways do not work
a method :Xsim two method:withVerilator
卢浩
@lh201430
I think it's win11 problem
Dolu1990
@Dolu1990
Hmmm
yes it seems more a win11 / java jni issue
which version of java do you have installed ?
Côme
@come_744:tedomum.net
[m]

Shouldn't x.fire be renamed x.fired or x.isFired? fire sounds like an method to perform an action but it is a getter.

https://spinalhdl.github.io/SpinalDoc-RTD/master/SpinalHDL/Libraries/stream.html#functions

Dolu1990
@Dolu1990
so, i would not delete the "fire" but yeah that's right, a better named alternative could be added
isFiring ?
3 replies
Côme
@come_744:tedomum.net
[m]
Maybe adding a synonym, and deprecate the other one? (remove it in 2024 for a new major release with breaking changes?)
Dolu1990
@Dolu1990
yes XD
i mean, removing "fire", even in 2024 is looking for paine and suffering
4 replies
Côme
@come_744:tedomum.net
[m]
Indeed
wifasoi
@wifasoi:matrix.org
[m]
or just put a deprecation warning with scalafix.. but yes Api changes are a French bread in the back
1 reply
never used fully scalafix.. I know that it can throw a warning and the user can have a way to change the source code semi-automatically
it could be a solution to ease the adoption to a cleaner API
Côme
@come_744:tedomum.net
[m]
https://www.scala-lang.org/api/current/scala/deprecated.html it seems to make it possible to print the warning but not to declare how to fix it
Oron Port
@soronpo
Scalafix can change the code
wifasoi
@wifasoi:matrix.org
[m]
From the same people that broght to you FizzBuzzzEnterpriseEdition®
Côme
@come_744:tedomum.net
[m]
Is there a description/explanation of the logo? I guess the red color is about Scala?