openxiangshan / fudian Goto Github PK
View Code? Open in Web Editor NEWOpen source high performance IEEE-754 floating unit
Open source high performance IEEE-754 floating unit
Hi, we are trying to reproduce some of the floating-point bugs in Nan Hu to verify our internal product.
We checkout the nanhu design at: c067e65501c4d8dd61f010176acd9161272b9c92.
However, as I'm now trying to run fudian (43474be), I'm running into errors like below:
[info] compiling 17 Scala sources to /mnt/efs/home/jascheng/xs-env/XiangShan/fudian/out/fudian/compile/dest/classes ...
[error] /mnt/efs/home/jascheng/xs-env/XiangShan/fudian/src/main/scala/fudian/FADD.scala:35:58: overloaded method value apply with alternatives:
[error] (x: BigInt,y: BigInt)chisel3.UInt
[error] (x: Int,y: Int)chisel3.UInt
[error] (x: chisel3.UInt)chisel3.Bool
[error] (x: Int)chisel3.Bool
[error] (x: BigInt)chisel3.Bool
[error] cannot be applied to ()
[error] val adder_in_sig_b = Mux(effSub, (~adder_in_sig_b_raw).asUInt(), adder_in_sig_b_raw) + effSub
[error] ^
[error] /mnt/efs/home/jascheng/xs-env/XiangShan/fudian/src/main/scala/fudian/FADD.scala:103:52: overloaded method value apply with alternatives:
[error] (x: BigInt,y: BigInt)chisel3.UInt
[error] (x: Int,y: Int)chisel3.UInt
[error] (x: chisel3.UInt)chisel3.Bool
[error] (x: Int)chisel3.Bool
[error] (x: BigInt)chisel3.Bool
[error] cannot be applied to ()
[error] val b_sig = (Cat(b.sig, 0.U(1.W)) >> need_shift).asUInt()
[error] ^
[error] /mnt/efs/home/jascheng/xs-env/XiangShan/fudian/src/main/scala/fudian/FADD.scala:113:36: overloaded method value apply with alternatives:
[error] (x: BigInt,y: BigInt)chisel3.UInt
[error] (x: Int,y: Int)chisel3.UInt
[error] (x: chisel3.UInt)chisel3.Bool
[error] (x: Int)chisel3.Bool
[error] (x: BigInt)chisel3.Bool
[error] cannot be applied to ()
[error] val lza_str_zero = !Cat(lza_str).orR()
[error] ^
[error] /mnt/efs/home/jascheng/xs-env/XiangShan/fudian/src/main/scala/fudian/FADD.scala:120:7: overloaded method value apply with alternatives:
[error] (x: BigInt,y: BigInt)chisel3.UInt
[error] (x: Int,y: Int)chisel3.UInt
[error] (x: chisel3.UInt)chisel3.Bool
[error] (x: Int)chisel3.Bool
[error] (x: BigInt)chisel3.Bool
[error] cannot be applied to ()
[error] ).asUInt())(precision , 0)
[error] ^
[error] /mnt/efs/home/jascheng/xs-env/XiangShan/fudian/src/main/scala/fudian/FADD.scala:139:61: overloaded method value apply with alternatives:
[error] (x: BigInt,y: BigInt)chisel3.UInt
[error] (x: Int,y: Int)chisel3.UInt
[error] (x: chisel3.UInt)chisel3.Bool
[error] (x: Int)chisel3.Bool
[error] (x: BigInt)chisel3.Bool
[error] cannot be applied to ()
[error] case i => lza_str.head(precision + 1 - i - 1).orR()
[error] ^
[error] /mnt/efs/home/jascheng/xs-env/XiangShan/fudian/src/main/scala/fudian/FADD.scala:557:40: overloaded method value apply with alternatives:
[error] (x: BigInt,y: BigInt)chisel3.UInt
[error] (x: Int,y: Int)chisel3.UInt
[error] (x: chisel3.UInt)chisel3.Bool
[error] (x: Int)chisel3.Bool
[error] (x: BigInt)chisel3.Bool
[error] cannot be applied to ()
[error] val need_swap = exp_diff_a_b.head(1).asBool() || b_flags.overflow
[error] ^
[error] /mnt/efs/home/jascheng/xs-env/XiangShan/fudian/src/main/scala/fudian/FCMP.scala:27:49: overloaded method value apply with alternatives:
[error] (x: BigInt,y: BigInt)chisel3.UInt
[error] (x: Int,y: Int)chisel3.UInt
[error] (x: chisel3.UInt)chisel3.Bool
[error] (x: Int)chisel3.Bool
[error] (x: BigInt)chisel3.Bool
[error] cannot be applied to ()
[error] val uint_less = fp_a.sign ^ a_minus_b.head(1).asBool()
[error] ^
[error] /mnt/efs/home/jascheng/xs-env/XiangShan/fudian/src/main/scala/fudian/FDIV.scala:318:19: overloaded method value apply with alternatives:
[error] (x: BigInt,y: BigInt)chisel3.UInt
[error] (x: Int,y: Int)chisel3.UInt
[error] (x: chisel3.UInt)chisel3.Bool
[error] (x: Int)chisel3.Bool
[error] (x: BigInt)chisel3.Bool
[error] cannot be applied to ()
[error] val sticky = (r.orR()) || (needShiftReg && qFinal(0)) // if non-zero remainder( which must be positive), we
[error] ^
[error] /mnt/efs/home/jascheng/xs-env/XiangShan/fudian/src/main/scala/fudian/FDIV.scala:319:43: overloaded method value apply with alternatives:
[error] (x: BigInt,y: BigInt)chisel3.UInt
[error] (x: Int,y: Int)chisel3.UInt
[error] (x: chisel3.UInt)chisel3.Bool
[error] (x: Int)chisel3.Bool
[error] (x: BigInt)chisel3.Bool
[error] cannot be applied to ()
[error] val round = Mux(needShiftReg, qFinal(1).asBool(), qFinal(0).asBool)
[error] ^
[error] /mnt/efs/home/jascheng/xs-env/XiangShan/fudian/src/main/scala/fudian/FMUL.scala:78:43: overloaded method value apply with alternatives:
[error] (x: BigInt,y: BigInt)chisel3.UInt
[error] (x: Int,y: Int)chisel3.UInt
[error] (x: chisel3.UInt)chisel3.Bool
[error] (x: Int)chisel3.Bool
[error] (x: BigInt)chisel3.Bool
[error] cannot be applied to ()
[error] val prod_exp_uf = shift_lim_sub.head(1).asBool()
[error] ^
[error] 45 errors found
Am I missing something?
I’m not sure if I understand it correctly. Please correct me if I’m wrong. Are there any registers in FADD? I understand that there is a near path and a far path, but if you expect everything to be done in a single cycle, then the timing (critical path) is always determined by the far path. In that case, it seems it does not make sense to have two paths.
看到这个repo,包含的源代码,是scala?没看错吧。想了解一下,为什么是用Scala来实现,而不是传统的c/cpp, 或者是新潮的Rust等。
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.