How to preserve wires during Yosys ABC implementation step - synthesis

I am implementing a simple circuit and want to preserve some wires during implementation using Yosys ABC. I am synthesizing using synth_ice40. I am using (* keep *) in my Verilog code to preserve the wires but I have noticed that after TECHMAP pass, the wires are removed and I can not see them anymore when I View my text file using ice40_viewer.
Could someone please provide a solution or comment on why it is happening this way?

Related

Why do we need to select a board to work with arduino IDE

I always wondered how this works . In arduino IDE we have option to select different boards because the code upload i guess is different ? Also there is possibility to even add board manager url to add other boards.
Why uploading the code is so different from board to board , and what exactly differs there ? The code is sent to via serial connection and i understand that a board might have different chip for handling USB to serial but ..
Can someone explain as clear as possible , how the code is uploaded to a board and why there is no generic way , why so many configurations.
Thanks and sorry if is a dumb question.
One of the important things that selecting a board does is, as you say, inform the IDE of how to load code onto the board. Perhaps more importantly, the board definitions give you the logical mapping of the board's hardware to the code constructs you are using to program against. For example, have you ever wondered what happens when you use a constant like PIN_13, or how that constant maps to a physical pin on your board, which has a trace to some contact on the microcontroller chip itself?
There is a lot of other code you don't see, much of it in the board definitions (and some in the Arduino core) which lets you work with relatively direct concepts (like pin numbers and modes) in the code that you write or edit.

Micro:bit Bluetooth Low Energy Hacking Persistence (High School Internship Project)

My project is to create an interactive program using the Micro:bit microprocessor I'm building a game which uses a drill motor as a controller of sorts reading the rotation direction and speed as inputs for control
but my mentor also said it would be cool to power the board at the same time as the game is running so now I hit the situation where once I stop turning to change direction or my speed goes below transmitting 3.3 volts to power it then the game restarts and I lose all progress
I had the Idea of using a second micro:bit as a sort of storage place being powered by my computer and the two continuously communicating sending back player position and other objects on the LED's
but i can't figure out how to get the two Micro:bit's to talk to each other
If someone could just point me in the right direction or even set up some sort of communication to nudge me in the right direction as I start moving forward
i'm a high school student who doesn't know as much as I pretend to so I'll probably need a lot of help (i am more advanced then most in my class at this sort of thing so think of me as a tech gifted teenager thrown in with college students losing my undeserved ego day by day LOL) please help me somehow I'm currently completely lost
You won't be able to use Bluetooth for the reasons indicated in the documentation (not enough memory): http://microbit-micropython.readthedocs.io/en/latest/ble.html
However, there is an incoming implementation of the lighter radio module, which would allow you to send simple data: https://github.com/bbcmicrobit/micropython/pull/283
The proposed documentation can be found in: https://github.com/bbcmicrobit/micropython/pull/305
As you can see in GitHub, at the time of writing it has not yet been merged into micropython. So if you'd like to try it you would have to clone the repository, apply the patch and build it from source. Keep in mind there is risk for the API to change, as there are still discussions about it.
Alternatively, as Sean has mentioned, you can use the C++ DAL implementation of the radio module to get something running on the meantime. Or if you prefer, the blocks and touch develop languages also offer radio functionality.
I don't think there is a way to do this in micropython (or at least simply), but the microbit runtime docs describe that, as well as supporting bluetooth, the 2.4 GHz radio:
However, it can also be placed into a much simpler mode of operation based that allows simple, direct micro:bit to micro:bit communication
In order to use this, you might need to write in c++ using the mbed environment (or offline) - but I hope this at least gives you a pointer to start from.
Here's a blog post describing how to do data logging using two microbits in exactly the configuration you describe.
http://www.suppertime.co.uk/blogmywiki/2016/06/microbit-logger
How to get the two micro:bits to talk to each other
As of 2016, you can! First check micropython has the radio module
import radio
If you get the error "No module named 'radio'", use https://codewith.mu/
Then follow the radio tutorial https://microbit-micropython.readthedocs.io/en/latest/tutorials/radio.html
The API is
https://microbit-micropython.readthedocs.io/en/latest/radio.html

start point for partial reconfiguration in xilinx virtex 5 board

I,m going to learn working with partial reconfiguration xilinx boards. I've read xilinx guide and know about ISE, plan ahead and vivado.
but for starting I couldn't find any example. Is there simple example codes for beginning?
steps of making partial reconfiguration project is written in xilinx user guide(ug720) but there isn't any verilog or vhdl code to synthesis and going forward with them! Is there simple code to start with them?
You could start with different counter designs. The counter works as a clock divider to generate a 2.0, 1.0 and 0.5 Hz signal, which is displayed on a LED.
Each counter is one reconfigurable design and your top module represents the mapping of the counter output to the LED pin. So if your reconfiguration works correct, the frequency should be equal to the selected partial design.
Now you can expand your design and add DCM/MMCMs, BlockRAMs or what ever.

A way to change mcu program from the outside

We need to change a controller code from the out side as they do with industrial MCU .
So that you have an mcu,with a program on it, and someone can program some "words" to it, that will determine how it works.
So for example you can program an mcu -not with a programer but with some inputs from serial, to do some simple things such as:
if input A==1
b=1
I wonder if there is a smart way to do that with simple software on the mcu, that it has many #defines for various commands, and it perform them according to values it gets from the outside (and saved for the rest of the program).
I wonder if the industrial programers are using that method, or that every programing of a user is actually load a code(.hex) to the chip(with internal programer ) .
I prefer the simplest way(i wonder if its by pre defined software)
A couple of options come to mind so hopefully this answers your question. It sounds like the simplest version of your question is "How do I change the behavior of the MCU without an actual MCU programmer?" A couple of options come to mind.
1) Depending on the MCU you can have a bootloader that is essentially a small piece of code programmed in the MCU by a programmer that has the ability to reprogram other parts of the MCU. This doesn't require a programmer but involves some other form of letting the bootloader know what the new code is (USB, Serial, SD Card, etc). This will only work if the MCU has the ability to self flash.
2) Again, depending on MCU and scenario you could program a generic set of rules that carry out functionality based on the inputs given to the MCU. This could be in the form of IO pins, EEPROM, or a domain-specific script on an SD card that the MCU can read and interpret at runtime.
Both options depend on the MCU you are using and what hardware capabilities you have at your disposal. But you certainly have options other than reprogramming the end hardware with an actual programmer every time you want to make a change. Hopefully that helps.

Qt distinguish two keyboards? (One is actually RFID reader)

I have simple RFID reader that actually behaves as keyboard and returns read values with return character at the end.
I want my application to listen only single (distinct) keyboard device (which i will choose/distinguish somehow) and to get the read value for me no meter where the focus is on the form/application.
Application is written with Qt C++
I'm wondering if this is possible and how?
Don't know if this helps, but we had a similar challenge of detecting input from a barcode scanner. The scanner just "typed" in some digits really fast; some scanners end it with a control character but since it's not universal we couldn't even rely on that.
I noticed that a QEvent::KeyboardLayoutChange would fire when the barcode scanner started its input, but I'm not sure if this applies in all the possible scenarios - but you might want to check for that.
We ended up installing an application-wide event filter (QApplication::installEventFilter) that checks for keystrokes (QEvent::ShortcutOverride or QEvent::KeyPress) and based on criteria such as contiguous digit sequence, very short time interval, etc. decides that it was a barcode input. It has obvious pitfalls, but if you need a very general solution you might be interested in something similar. Also, if the RFID input always returns a control character this might simplify this approach quite a bit.
This is possible for windows OS with help of WinAPI. I have never use QT so I dont know if some wrappers exists in QT classes for that purposes.
You should use raw input. Check this link for quick reference:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms645536(v=vs.85).aspx (there is example there under Using Raw Input section
also take a look at this project http://www.codeproject.com/Articles/17123/Using-Raw-Input-from-C-to-handle-multiple-keyboard I understand its writen on C#, but it may be helpful

Resources