All posts by ncrmnt

The painfull verilog preprocessor pitfall

Just a little note about how includes and `defines work in verilog which is VERY different from how they behave in most programming languages. This may not really hurt in a small project, but can become a real PITA in a big project with a dozen of third-party blocks.

TL;DR: Macro defines are have a global scope in verilog and propagate from file to file during one tool invocation.

Continue reading The painfull verilog preprocessor pitfall

An EasyCAP Box with V-Slot mount

Okay, I admit, adding a webcam to watch how your print is doing in nothing new, but since I plan on hooking 4 cameras, that might be considered novel. Anyway, in the earlier post I described the analog camera modules I’ve found in the attic and added a nice 3d-printed camera mount, in this post I will describe the other hardware part of my capture setup. But before the lengthy details – here goes a test capture from one of the cameras.

As you see the quality is not of the best and high temperature in the printing chamber contributes a lot to the noises from the camera matrix.

Continue reading An EasyCAP Box with V-Slot mount

Data Recovery: SD, ddrescue and Android

All things come to an end at some point, so do uSD cards. And they tend to do that just about the time you normally LEAST expect them to.
Anyways, at my country house, away from the noise of the big city I had a cheap cellphone tethering internets over an OpenVPN connection. The operator does not offer proper external IP service, so I have to run an OpenVPN connection to have access to surveillance.
I have a bunch of cams here and there, mostly watching after these guys:

The cellphone itself runs a rooted android and a debian chroot with OpenVPN off an SD card. The SD card died this weekend and at some point I realised that I don’t have a recent backup. It was no big deal, just a debian rootfs + a bunch of config files for OpenVPN, but since I spent a while then and now perfecting configs and tuning OpenVPN for performance over the celluar network those weren’t backed up. Ooops.

Anyways, this note talks about data recovery from such an SD card and the common pitfalls.

Continue reading Data Recovery: SD, ddrescue and Android

Flying Bear P902: Fixing extruder dust problem

I recently got myself a new toy, so to speak. It’s a brand new Flying Bear P902 3d printer. For it’s price (~300$) it’s an awesome machine and is way better made than my old 2nd gen Solidoodle. So I’ll be posting a series of hacks that I had to do to work comfortably with it and this is the first post in series, starting with this one.

Continue reading Flying Bear P902: Fixing extruder dust problem

Social networks integration test

It’s been a while since I’ve posted anything in my blog so many of you might’ve thought that I’ve abandoned it. Well, on the contrary, I decided to put a little more life in it, so I will be posting way more tech tips here. And, since apparently there’s no other way, I’ve set up social integration for this blog. For now – only twitter and vkontakte. This is basically a test post to see if everything works as expected.

Do not expect me to answer any friend request/private message/retweet whatsoever. If you really want to contact me – email is still the best option. Why? Because it took 5 minutes since registration on vk for first spammers to start doing their dirty work: .

Continue reading Social networks integration test

3D-printed arrow nocks for easton carbon one arrows

Okay, time to introduce the rare reader to a brand new section of this blog: “archery”. Something that you’d never expect, right? And this will be the very first post covering this topic. Everyone who starts archery as a hobby soon has a terrible itch to cut down the costs on it… somehow. Since there aren’t many archers out there archery stuff is quite pricy, especially if you want to to compete on at least amateur level.

img_20160828_112710.jpg

Continue reading 3D-printed arrow nocks for easton carbon one arrows

Weird Trickery: Compiling verilog VPI extension and unit-testing it using cmake/ctest

A few months ago I needed to write a VPI extension for verilog HDL and (just as I would normally do) I needed a proper buildsystem for that stuff. Unfortunately in terms of build/debug/test tools the folks doing ASIC are living… Well, not in the stone age, but in their own small isolated world and keep reinventing the wheel over and over again. OpenSource iverilog simulator didn’t go far away from the proprietary counterparts that tend to ditch commonly used in linux environments best practices.
Okay, now let’s stop bitching about the way things are and decide how to deal with that kind of stuff. In this note I’ll try to describe how to make a CMakeLists.txt for compiling a VPI extension and unit-testing it with ctest.

Continue reading Weird Trickery: Compiling verilog VPI extension and unit-testing it using cmake/ctest