Chisel 3: RegInit doubly imported? - chisel

After upgrading Chisel 3 to git master (a6798ad) I'm getting errors about RegInit being imported by both chisel3.util._ and chisel3._. For instance, this happens when compiling chisel-testers (9389343):
chisel-testers/src/main/scala/chisel3/iotesters/SteppedHWIOTester.scala:177: reference to RegInit is ambiguous;
[error] it is imported twice in the same scope by
[error] import chisel3.util._
[error] and import chisel3._
[error] val done = RegInit(false.B)
[error] ^
How should this be fixed?
Judging by its log, this commit of chisel-testers was tested against a recent commit of Chisel 3, so I don't even understand how this issue only seems to manifest for me.

Related

Cannot install jinja2 with jython pip?

I am using Windows 7 with Jython 2.7.0. I am able to run jython --version and pip --version in the bin directory and get back what I expect, 2.7.0 and 1.6, with a bunch of extra information.
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\myUser>cd ../..
C:\>cd jython2.7.0/bin
C:\jython2.7.0\bin>pip --version
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.python.core.PySystemState (file:/C:/jy
thon2.7.0/jython.jar) to method java.io.Console.encoding()
WARNING: Please consider reporting this to the maintainers of org.python.core.Py
SystemState
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflect
ive access operations
WARNING: All illegal access operations will be denied in a future release
Feb 16, 2021 1:37:50 PM org.python.netty.util.internal.PlatformDependent <clinit
>
INFO: Your platform does not provide complete low-level API for accessing direct
buffers reliably. Unless explicitly requested, heap buffer will always be prefe
rred to avoid potential system unstability.
pip 1.6.dev1 from C:\jython2.7.0\Lib\site-packages (python 2.7)
I try to install jinja2 with pip install jinja2 and have also tried it captialized since I saw that as well pip install Jinja2 and get the following
C:\jython2.7.0\bin>pip install jinja2
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.python.core.PySystemState (file:/C:/jy
thon2.7.0/jython.jar) to method java.io.Console.encoding()
WARNING: Please consider reporting this to the maintainers of org.python.core.Py
SystemState
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflect
ive access operations
WARNING: All illegal access operations will be denied in a future release
Feb 16, 2021 1:44:35 PM org.python.netty.util.internal.PlatformDependent <clinit
>
INFO: Your platform does not provide complete low-level API for accessing direct
buffers reliably. Unless explicitly requested, heap buffer will always be prefe
rred to avoid potential system unstability.
Downloading/unpacking jinja2
Got this failure javax.net.ssl.SSLException: Tag mismatch! during SSL handshake
(<_realsocket at 0x215 type=client open_count=1 channel=[id: 0x53d8a502, /192.16
8.1.59:64975 => pypi.python.org/199.232.36.223:443] timeout=15.0>)
Got this failure javax.net.ssl.SSLException: Tag mismatch! during SSL handshake
(<_realsocket at 0x216 type=client open_count=1 channel=[id: 0x3d4b1e67, /192.16
8.1.59:64976 :> pypi.python.org/199.232.36.223:443] timeout=15.0>)
←[31m Cannot fetch index base URL https://pypi.python.org/simple/
←[0mGot this failure javax.net.ssl.SSLException: Tag mismatch! during SSL handsh
ake (<_realsocket at 0x217 type=client open_count=1 channel=[id: 0x5f10319d, /19
2.168.1.59:64977 :> pypi.python.org/199.232.36.223:443] timeout=15.0>)
←[31m Could not find any downloads that satisfy the requirement jinja2
←[0mCleaning up...
←[31mNo distributions at all found for jinja2
←[0m←[31mStoring debug log for failure in C:\Users\bkarabinchak\.pip\pip.log
←[0m
This line ←[31mNo distributions at all found for jinja2 makes me think there is no Jinja2 for jython, nor Cheetah which I also tried to install. I tried those as they were referenced here as jython HTML Templaters.
Can someone either 1) Help me troubleshoot installing jinja2 or 2) Recommend a HTML Template package that does exist for jython if jinja2/Cheetah do no work?

Compiling Modules Separately and Linking

I'm compiling some very large projects in chisel3 with lots of wires and connections. Right now, the top level object and all of its submodules are in the same Scala package, and I run sbt "runMain top.Instantiator --verilog". However, it crashes in FIRRTL with:
[info] Done packaging.
[info] Running top.Instantiator --verilog --testArgs vcs
[info] [0.005] Elaborating design...
[info] [68.146] Done elaborating.
[error] (run-main-0) java.lang.NegativeArraySizeException
[error] java.lang.NegativeArraySizeException
[error] at java.util.Arrays.copyOf(Arrays.java:3332)
[error] at org.antlr.v4.runtime.ANTLRInputStream.load(ANTLRInputStream.java:101)
[error] at org.antlr.v4.runtime.ANTLRInputStream.<init>(ANTLRInputStream.java:64)
[error] at org.antlr.v4.runtime.ANTLRInputStream.<init>(ANTLRInputStream.java:60)
[error] at org.antlr.v4.runtime.ANTLRInputStream.<init>(ANTLRInputStream.java:68)
[error] at firrtl.Parser$$anonfun$1.apply(Parser.scala:35)
[error] at firrtl.Parser$$anonfun$1.apply(Parser.scala:29)
[error] at firrtl.Utils$.time(Utils.scala:135)
[error] at firrtl.Parser$.parse(Parser.scala:29)
[error] at firrtl.Driver$$anonfun$execute$1.apply(Driver.scala:171)
[error] at firrtl.Driver$$anonfun$execute$1.apply(Driver.scala:140)
[error] at logger.Logger$$anonfun$makeScope$1.apply(Logger.scala:129)
[error] at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58)
[error] at logger.Logger$.makeScope(Logger.scala:127)
[error] at firrtl.Driver$.execute(Driver.scala:140)
[error] at chisel3.Driver$.execute(Driver.scala:180)
[error] at chisel3.Driver$.execute(Driver.scala:200)
[error] at fringe.CommonMain$class.main(CommonMain.scala:64)
[error] at top.Instantiator$.main(Instantiator.scala:17)
[error] at top.Instantiator.main(Instantiator.scala)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] at java.lang.reflect.Method.invoke(Method.java:498)
[error] Nonzero exit code: 1
[error] (Compile / runMain) Nonzero exit code: 1
My guess is that the huge number of wires and connections in the project are causing some overflow. Does anyone have experience with this kind of error and advice on how to go about debugging it? Right now, my ideas are to
1) refactor the chisel code to make it easier to compile
2) figure out a way to generate verilog for each module separately and then link them together at the end. Is there a way to compile non-recursively so I don't run into the same error when I get to compiling top.Instantiator?
3) separate the packages/projects somehow so that sbt works on each one separately
Thanks
Adding idea 4) Use protobuf serialization between chisel and firrtl.
I can see that firrtl is blowing up in the parser. The protobuf support is fairly new, but I believe it is much less memory intensive than the antlr based parser.
Here's an example of producing a firrtl protobuf serialization from chisel3
import chisel3._
class XX extends Module {
val io = IO(new Bundle {
val i = Input(UInt(1.W))
val o = Output(UInt(1.W))
})
io.o := io.i
}
object PB {
def main(args: Array[String]): Unit = {
val c = Driver.elaborate(() => new XX)
Driver.dumpProto(c, None)
}
}
You can then generate the verilog with the firrtl compiler
firrtl -i XX.pb -X verilog -o XX.v
Or build your own compiler something like
import firrtl._
object PB {
def main(args: Array[String]): Unit = {
Driver.execute(Array("-i", "XX.pb", "-X", "verilog", "-o", "XX.v"))
}
}
Your other options may be worth pursuing but this might be an easier quick fix.

:Maven build failure for spring cloud

I have been observing the build fail issue for this
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.springframework.cloud:spring-cloud-netflix-hystrix-stream:2.0.1.BUILD-SNAPSHOT (E:\springcloud\spring-cloud-netflix-master\spring-cloud-netflix-master\spring-cloud-netflix-hystrix-stream\pom.xml) has 1 error
[ERROR] Unresolveable build extension: Plugin org.springframework.cloud:spring-cloud-contract-maven-plugin:1.2.4.RELEASE or one of its dependencies could not be resolved: Failure to find org.springframework.cloud:spring-cloud-netflix-hystrix-contract:jar:2.0.1.BUILD-SNAPSHOT in https://repo.spring.io/libs-snapshot-local was cached in the local repository, resolution will not be reattempted until the update interval of spring-snapshots has elapsed or updates are forced -> [Help 2]
Please run ./scripts/build.sh to fix the issue.

Oozie 4.3.0 build failed on Hadoop 2.9.0

I ran the build with commands like this:
./mkdistro.sh -DskipTests
and this:
./mkdistro.sh -DskipTests -D hadoop.version=2.3.0 -P uber -P hadoop-2
But all failed with error messages:
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /root/oozie-4.3.0/hadooplibs/hadoop-utils-2/src/main/java/org/apache/oozie/action/hadoop/LauncherMainHadoopUtils.java:[31,49] error: cannot find symbol
[ERROR] package org.apache.hadoop.yarn.api.protocolrecords
/root/oozie-4.3.0/hadooplibs/hadoop-utils-2/src/main/java/org/apache/oozie/action/hadoop/LauncherMainHadoopUtils.java:[70,21] error: cannot find symbol
[ERROR] class LauncherMainHadoopUtils
/root/oozie-4.3.0/hadooplibs/hadoop-utils-2/src/main/java/org/apache/oozie/action/hadoop/LauncherMainHadoopUtils.java:[71,11] error: cannot find symbol
[INFO] 3 errors
...
I also tried to export HADOOP_CLASSPATH and CLASSPATH variables to point to the Hadoop libraries but all failed with same error. I am not sure if it is failed because the build command can't find hadoop libraries or it does not support Hadoop version 2.9.0.
Any idea?
watch it my newly created blog to install oozie-4.3.0 on combination of hadoop-2.9.0 step by step,
Installing apache oozie-4.3.0 on existing apache hadoop-2.9.0
hope this will help you.

Errors in 'com/badlogic/gdx/backends/gwt/GwtApplication.java encountered in HTML 5

Recently I have come to know about this awesome framework i.e Libgdx. I am completely new to this framework and hence a few hitches are obvious. I have cloned the entire repository and I have also run gdx-setup-ui.jar file. It gives me 4 basic starter projects. (my-gdx-game, my-gdx-game-android , my-gdx-game-desktop , my-gdx-game-html)
The android and desktop project runs well, but, when I am trying to run the HTML5 project, after clicking on the URL link, I am facing this error,
[TRACE] [com.me.mygdxgame.GwtDefinition] - Finding entry point classes
[ERROR] [com.me.mygdxgame.GwtDefinition] - Errors in 'com/badlogic/gdx/backends/gwt/GwtApplication.java'
[ERROR] [com.me.mygdxgame.GwtDefinition] - Line 273: No source code is available for type com.badlogic.gdx.Net; did you forget to inherit a required module?
[ERROR] [com.me.mygdxgame.GwtDefinition] - Line 393: No source code is available for type com.badlogic.gdx.utils.Clipboard; did you forget to inherit a required module?
[ERROR] [com.me.mygdxgame.GwtDefinition] - Errors in 'com/badlogic/gdx/Application.java'
[ERROR] [com.me.mygdxgame.GwtDefinition] - Line 117: No source code is available for type com.badlogic.gdx.Net; did you forget to inherit a required module?
[ERROR] [com.me.mygdxgame.GwtDefinition] - Line 159: No source code is available for type com.badlogic.gdx.utils.Clipboard; did you forget to inherit a required module?
[ERROR] [com.me.mygdxgame.GwtDefinition] - Errors in 'com/badlogic/gdx/backends/gwt/GwtNet.java'
[ERROR] [com.me.mygdxgame.GwtDefinition] - Line 12: No source code is available for type com.badlogic.gdx.Net; did you forget to inherit a required module?
[ERROR] [com.me.mygdxgame.GwtDefinition] - Line 14: No source code is available for type com.badlogic.gdx.Net.HttpResult; did you forget to inherit a required module?
[ERROR] [com.me.mygdxgame.GwtDefinition] - Line 24: No source code is available for type com.badlogic.gdx.net.ServerSocket; did you forget to inherit a required module?
[ERROR] [com.me.mygdxgame.GwtDefinition] - Line 24: No source code is available for type com.badlogic.gdx.Net.Protocol; did you forget to inherit a required module?
[ERROR] [com.me.mygdxgame.GwtDefinition] - Line 24: No source code is available for type com.badlogic.gdx.net.ServerSocketHints; did you forget to inherit a required module?
[ERROR] [com.me.mygdxgame.GwtDefinition] - Line 29: No source code is available for type com.badlogic.gdx.net.Socket; did you forget to inherit a required module?
[ERROR] [com.me.mygdxgame.GwtDefinition] - Line 29: No source code is available for type com.badlogic.gdx.net.SocketHints; did you forget to inherit a required module?
[ERROR] [com.me.mygdxgame.GwtDefinition] - Errors in 'com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/utils/Array.java'
[ERROR] [com.me.mygdxgame.GwtDefinition] - Line 342: No source code is available for type com.badlogic.gdx.utils.StringBuilder; did you forget to inherit a required module?
[ERROR] [com.me.mygdxgame.GwtDefinition] - Errors in 'com/badlogic/gdx/utils/ObjectMap.java'
[ERROR] [com.me.mygdxgame.GwtDefinition] - Line 468: No source code is available for type com.badlogic.gdx.utils.StringBuilder; did you forget to inherit a required module?
[ERROR] [com.me.mygdxgame.GwtDefinition] - Unable to find type 'com.me.mygdxgame.client.GwtLauncher'
[ERROR] [com.me.mygdxgame.GwtDefinition] - Hint: Previous compiler errors may have made this type unavailable
[ERROR] [com.me.mygdxgame.GwtDefinition] - Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly
[ERROR] [com.me.mygdxgame.GwtDefinition] - Failed to load module 'com.me.mygdxgame.GwtDefinition' from user agent 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1' at localhost:56812
Currently I am using libgdx version 0.9.7. My OS is Ubuntu 12, Eclipse Indigo.
Please help me out. Thanks.
I was having similar kind of error .. Just updated the Libgdx jar to the latest nightly build version, and problem will be solve.
what are the jars added in java build path of your html project. Also check if gdx-sources.jar is present or not in your html project. Also in java build path go to export tab and check is all the dependencies are checked or not.