Is there a method to pass strings in Chisel? For example, I want to pass a string ATGC and get the output as 0 for A, 1 for T, 2 for G and 3 for C. Is this possible? If yes, can anyone please elucidate? Thank you.
Using the code in the answer gives these errors:
[error] java.lang.NoSuchMethodException: problems.ATGCHandler.main([Ljava.lang.String;)
[error] at java.lang.Class.getMethod(Class.java:1786)
[error] at sbt.Run.getMainMethod(Run.scala:99)
[error] at sbt.Run.run0(Run.scala:86)
[error] at sbt.Run.execute$1(Run.scala:65)
[error] at sbt.Run.$anonfun$run$3(Run.scala:69)
[error] at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
[error] at scala.util.Try$.apply(Try.scala:209)
[error] at sbt.Run.directExecute$1(Run.scala:69)
[error] at sbt.Run.run(Run.scala:78)
[error] at sbt.Defaults$.$anonfun$bgRunMainTask$6(Defaults.scala:1147)
[error] at sbt.Defaults$.$anonfun$bgRunMainTask$6$adapted(Defaults.scala:1142)
[error] at sbt.internal.BackgroundThreadPool.$anonfun$run$1(DefaultBackgroundJobService.scala:366)
[error] at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
[error] at scala.util.Try$.apply(Try.scala:209)
[error] at sbt.internal.BackgroundThreadPool$BackgroundRunnable.run(DefaultBackgroundJobService.scala:289)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] (Test / runMain) java.lang.NoSuchMethodException: problems.ATGCHandler.main([Ljava.lang.String;)