Tumgik
echobravofoxtrot · 5 months
Text
celebrating fall with fletcher's checksum
This post originally appeared on my website.
why are checksums useful for fpga development?
Checksum functions are useful for error detection and data integrity. With respect to FPGA architecture development, a checksum can ensure the system is able to retain its state. For example, an FPGA programmed to behave like an AND gate should not start to act like an OR gate due fluctuations in voltage or temperature. Such problems may be caught by computing the checksum of the bitstream before configuring the FPGA, operating the device in the lab, and then extracting the bitstream and re-computing the checksum to ensure it has not changed.
The last two FPGAs that I worked on-with Indiana University's SAIL-IN Lab and the QuickLogic Corporation-used a scan chain configuration interface which lent itself well to bitstream verification via checksum. The scan chain acts like a serial shift register, stringing together all the configuration chain flip-flops in the FPGA fabric. As the bitstream flows through the head of the scan chain, one bit at a time, its checksum may be computed; and later re-computed as it flows out of the tail. For context, imagine a small, thirty-two flop scan chain and the corresponding bitstream, 0xdeadbeef. On the way in, the Fletcher's (32-bit) checksum will be 0xf13b. If the post-configuration checksum does not match, the engineers would know that there is an issue with the FPGA architecture.
Fletcher's checksum also produces check bytes (or a "tag"), which can be appended to the end of the original data, such that the new checksum of the data and the check bytes is zero. For the example bitstream 0xdeadbeef, the resulting check bytes are 0xd2f1. And the checksum of 0xdeadbeefd2f1 is 0x0.
fletcher's checksum in systemverilog
Based mostly on the Wikipedia entry for Fletcher's checksum, I produced a parameterized, three-state module which computes the checksum and check bytes of a data stream. The SystemVerilog closesly follows the below psuedo-code. For the Fletcher-32 checksum, data arrives as 16-bit half-words.
Tumblr media
Eventually, I'd like to wrap it in a SPI interface and submit it to TinyTapeout, but for now here's the bare RTL. The most up-to-date code is also available on GitHub:
Tumblr media
0 notes
echobravofoxtrot · 7 months
Text
return to the small web
This post originally appeared on my website
I was born shortly after the peak of the dot com bubble, after which point "google" became a verb and "facebook" was no longer something collecting dust in the attic. During this period, it felt as though the noisy construction of the modern Web was occurring in the next city over and not yet in the quiet towns where most of us resided. Recently, following the COVID-19 pandemic, many of us experience (social) media fatigue, and it lulls us back to when the Internet was more peaceful. To a time when most communication happened over email or XMPP, when we "followed" people by subscribing to their RSS feeds, and when a personal homepage was an extension of self.
This nostalgia for a simpler and more personal Internet is a driving factor behind what is known as the "small web" or "indie web." The small web is a loosely defined philosophy which promotes decentralization, user agency, and community. It does not intend to displace the tech giants of today, but instead it empowers people to host their own content and collaborate through alternative platforms. Many concepts and technologies fall under this umbrella: personal blogs, community forums, webrings, federation, etc. The ideology bears an intrinsic link to open-source software; and its echoes are audible in the alternative web protocol Gemini, federated platforms such as Mastodon and Lemmy, public-access UNIX boxes (also referred to as tilde communities), and more.
In this vast digital universe, the small web represents a commitment to authenticity. It encourages us to embrace the beauty of imperfection, celebrate individuality and diversity, and connect authentically. While it's quite possible that I'm just a corny nerd missing his childhood, I do hope to see others getting excited about this concept. At any rate, this little corner of the Internet is mine, and I intend to make something out of it.
11 notes · View notes
echobravofoxtrot · 3 years
Text
Tumblr media Tumblr media Tumblr media Tumblr media
The school bells are ringing! I am so looking forward to this year, especially now that things are starting to open up due to the availability of vaccines. I will be continuing in my role as an RA, but I now manage a floor comprised entirely of Computer Science and Engineering majors. The opportunity to tailor the residential curriculum specifically to topics in computing is going to be an amazing way to bring my own passions into the community. This year, I will also begin taking classes toward my master's degree in Computer Engineering, meaning that I will finish undergrad with half of my master's already out of the way!
Pictured in this post are some artifacts that I created this summer as a research assistant in a computing lab on campus. Our team is developing field programmable gate arrays (FPGAs) for defense applications. If you don't know, an FPGA is an integrated circuit that can be programmed to behave like any other circuit using a hardware description language like Verilog. They can be found in a host of devices you interact with every day (TVs, radios, cameras) as well as military-grade equipment like what I am working on. They are widely used due to their ease of programming, which allows for rapid and cost-effective development, as well as the ability to patch bugs without having to re-manufacture the circuitry.
In the lab, I maintain a custom toolchain that converts Verilog code into a bitstream that can be loaded onto our FPGA. At the moment, this is all happening in the context of a simulation, but by the end of the fall our little black box should come home from the factory and I can hold it in my hands! At that point, I will begin designing some circuit boards that make use of the device before it eventually makes its way onto a military drone or something of the sort.
I am very thankful for the experience I have gained so far, and I look forward to sharing more progress with you. Until next time!
37 notes · View notes
echobravofoxtrot · 3 years
Photo
Tumblr media Tumblr media Tumblr media Tumblr media
Okay, I am having way too much fun with this project… 
As a part of my cloud computing course, I have to train and deploy a machine learning solution. I chose to create a password strength classifier, which consists of two major parts. 
The first is an input vectorizer, which accepts text input and converts it to an array of floats that describe how the characters in your password relate to one another and to other passwords. The second part is the machine learning model, which is a multi-layer perception classifier. The model was fed over 500k passwords and their associated strength rating, which it used to fine tune the 500 neurons in each of its hidden layers. The training process took almost four hours, but as you can see by the F1 score and confusion matrix, it was worth the wait! 
This is my first time developing a machine learning model without a tutorial or textbook, and honestly the experience has been a blast so far. Even though my system is quite simple, building it reinforced a lot of the skills that I have been learning throughout this academic year. It also taught me how to vectorize text for deep learning, which is something I hope to apply to develop chatbots and NLP applications in the future. 
Next, I will be learning how to deploy this model in a Docker container and develop and API to allow clients to access it. I can’t wait to see how it turns out!
249 notes · View notes
echobravofoxtrot · 3 years
Text
Tumblr media
203 notes · View notes
echobravofoxtrot · 3 years
Photo
Tumblr media Tumblr media
I just finished a three-week course on circuit board design that my university offered during the winter session. I have always wondered how this process plays out, and I now have more respect for what is equal parts a technical process and an art form. Here is a Raspberry Pi HAT that I designed in KiCad as part of an assignment for the class. The most interesting part of the project had to be the copper fills shown in the CAD diagram in lime green, which will serve as ground. I have seen these raised areas on circuits before, but I had no idea what they were for until now. My routing job is nowhere near perfect, but it’s not bad for a beginner! I can’t wait to keep practicing and eventually design some boards of my own.
14 notes · View notes
echobravofoxtrot · 3 years
Photo
Tumblr media Tumblr media Tumblr media
Handwriting update!
It’s crazy to think that my penmanship could improve so much in just three semesters. I owe it to my reMarkable tablet, no doubt. Being able to hit undo and digitally move text around encourages me to be neat and take my time.
3 notes · View notes
echobravofoxtrot · 3 years
Text
Reverse Engineering: A Quick Overview
Thank you to @mourza​ for the question on my previous post. Here, I will try my best to explain how reverse engineering works for Mourza and anyone else who might be interested. Full disclosure: I am NOT an expert on the matter, just an enthusiastic student who learned about this last semester.
But First, A Review of Assembly
As you may know, computers can only think in binary. That is, your CPU can only understand 1 or 0, high or low, on or off. Even though anyone can write software using a high-level language like C, Java, or Python, at some point it will need to be compiled down to those 1s and 0s that can talk directly to the CPU.
Take, for example, the following C-like statement.
int x = 49;
When this statement is compiled into a program, it will be converted to assembly language, which will allow your operating system to bind binary instructions directly to the CPU. Each brand of processor has a unique assembly language, but here is an example of what the code might look like after compilation.
movl $49, -8(%rbp)
While this may not look like anything meaningful at first glance, we can go ahead and interpret it. In essence, the line is going to move the numerical value of 49 into the register known as the base pointer. If you want to learn more about the assembly instructions for 64-bit Intel processors (the kind you probably have in your computer), check out this reference sheet.
Reading Assembly with Radare
At this point, you might be wondering how you can see this assembly code. If you try to open up a .EXE file in a text editor, you will not see a statement like the above. Instead, you might find a bunch of garbled nonsense. What you would be looking at are the binary instructions that will go to your CPU, but your text editor is trying to interpret them as text.
If you want to see the assembly, you have to use a decompiler such as radare2. I won’t go into the nitty gritty of how to install or use it, since you can read about that on their website. That being said, if you download the reference sheet PDF I linked above and go to my previous post, you can probably read the screenshot and figure out the password to diffuse the “bomb” program. I challenge you to comment on that post with the password!
I have to break it to you, though. Most programs are not quite as easy to decompile and read. The binary bomb is an assignment designed to help students like myself practice reading assembly. Most programs you use every day are insanely complex, and it just wouldn't be possible to navigate their instructions. But for smaller executables, especially malware, it can be possible to peek inside and figure out how they are causing damage.
I hope that this post was helpful and interesting!
3 notes · View notes
echobravofoxtrot · 3 years
Photo
Tumblr media
I think that the coolest thing that I learned how to do last semester was reverse-engineer binary executables. Here, I am using radare2 to examine a "binary bomb,” which could be diffused by extracting the passcodes from its decompiled source code. This skill has already helped me understand the algorithms behind some of my favorite programs, and I hope to one day use it to examine malware and learn more about how computer viruses work.
87 notes · View notes
echobravofoxtrot · 3 years
Photo
Tumblr media
One of the nice things about being stuck in quarantine during the holidays was that I finally had the time to play around with circuits. When I was a kid, I remember playing with Snap Circuits and building noise-makers and AM radios, and this really feels like the big boy version.
I bought a tackle box and filled it with a variety of electronic components, and now I am trying to make a couple of projects each week to learn more about how electricity works. Once I have gotten the hang of things, I plan to buy a couple of ICs and EEPROMS that I find interesting and see if I can wire them up to the Arduino. I would really like to study the chips found in the Suzuki Omnichord and the Texas Instruments Speak & Spell, to name a few. If I ever get to them, I will definitely post here!
85 notes · View notes
echobravofoxtrot · 3 years
Photo
Tumblr media Tumblr media
After countless hours and way too many microwavable meals to get me through them, I completed the second and final semester of physics required for my computer engineering degree. While it wasn’t easy, the intense course load and complicated material helped me strengthen my studying and time-management skills. Especially with courses being taught online, being able to motivate myself to engage with the material became very important, and I think I have gotten good at it.
The second semester was definitely way better than the first for me, not only because I already had experience with the course structure and exam format, but because I am much more interested in electricity and magnetism. The circuits unit was especially relevant to my major, and I can’t wait to apply what I have learned in my future coursework.
7 notes · View notes
echobravofoxtrot · 3 years
Text
My first numbers station was HM01, which is still on the air! I managed to get a program called DIGTRX installed in a wine32 wrapper on my Mac, which I used to record and decrypt the RDFT headers at the beginning of each transmission.
Old Russian Numbers Stations and chill?
18 notes · View notes
echobravofoxtrot · 3 years
Photo
Tumblr media
Happy 2021, everyone!
This academic year, I have been working as a Resident Assistant on campus. The job is a lot different than I was expecting due to the pandemic, plus I am stationed at the university’s “party dorm,” but I still enjoy it. I have thirty residents who are all very kind and academically driven, and we all get along.
Here are a couple of the “door decs” that I made during the first semester to go with my floor’s Pokémon theme. I think they turned out nicely, and the residents appreciated them. I am not sure what I will do for this semester. What do you think I should try?
6 notes · View notes
echobravofoxtrot · 4 years
Photo
Tumblr media
Hello, everybody!
I am finished with my Linear Algebra course, wooo! The class was tons of fun, and I gained some useful insights that I will be applying to a programming project that I have started surrounding Linear Predictive Coding! Plus, I got to test-drive more online classes before that becomes everyone’s reality starting in August...
Since I am incapable of handling free time between now and then, I have started to take a Physics course offered for free by MIT, and I am hoping to pre-learn some of the material before I take my university’s electromagnetism class next semester. Today, I learned about electric fields and dipoles. Interesting stuff!
I am also experimenting with some new note-taking styles, which I hope will make it easy to cross-reference these notes later during the school year. If you have any creative tips, definitely share them with me so I can give them a try!
What’s new with you? I am hoping that everyone is doing well and continuing to learn these days <3
19 notes · View notes
echobravofoxtrot · 4 years
Text
Tumblr media
Tonight I (finally) started the programming project that motivated me to learn to code! There’s this old Mac application that I love, and it was written in Objective-C long enough ago that it’s no longer compatible with macOS. I have been at a loss without it, but I did not know enough C to rewrite it... until now. I have started re-writing it in Swift using new experience gained in my Software Engineering (C) course, and my first batch of unit tests passed! I feel super accomplished, but I hope that the complexity of the project doesn’t eventually swallow me whole... Fingers crosssed!
6 notes · View notes
echobravofoxtrot · 4 years
Photo
Tumblr media Tumblr media Tumblr media
I know it’s been a while! I hope everyone’s finals went well and that you and your families have been safe and healthy during these difficult times <3. Although school is out, I have been taking Linear Algebra online toward my math minor, and I will be informally studying Physics II starting next week in preparation for next semester. Linear Algebra is a lot of theory, so my notes are not always very pretty—mostly just text-heavy. Totally unrelated, but I also found this 3D-printed moon light in my bedroom at home, and I love studying by its light!
28 notes · View notes
echobravofoxtrot · 4 years
Quote
It was a tense five minutes. We, the audience, alternated between fearing for our lives and lamenting hers that could have given her the kind of emotional experience to play this devastating song. Then slowly, gently, Clara's hands came to rest. The theremin went quiet, the glass stopped rattling, and the room relaxed, unharmed.
Kentucky Route Zero, Act IV
28 notes · View notes