HNHacker News
TopNewBestAskShowJobs

bunnie

2,002 karma · joined March 9, 2013

submissionscomments
bunnie··on Baochip-1x: What it is, why I'm doing it now and how it came about
In general, things that are not strictly digital (PHYs, regulators, PLLs, ADCs) contain significant amounts of foundry IP that would be hard to release as open source. But also, some parts of the chip, for example the AXI bus fabric, were licensed simply as a risk reduction measure. If the bus fabric is bad, you've wasted millions of dollars on a mask set with little recourse. I tried to pull in some open source AXI fabrics and it wasn't pretty...a lot of rework required and even then still some bugs made it through to tape-out. Over time more and more of this can be opened but it all takes time, money, and people willing to do it.
bunnie··on Baochip-1x: What it is, why I'm doing it now and how it came about
The chip comes from the factory with a boot0/boot1 chain that is fully reproducible and buildable from source. Developers can replace boot1 with their own version, where you could add the feature you're thinking about.
bunnie··on Baochip-1x: What it is, why I'm doing it now and how it came about
Rule of thumb is that a processed wafer from 28nm and older is around $3k/wafer and the cost goes up kind of exponentially towards the smaller nodes. Also, in general, the fab wants you to order a "FOUP" of wafers at a time - that's 25 wafers at a go.
bunnie··on Baochip-1x: What it is, why I'm doing it now and how it came about
I'm actually working on a comprehensive write up on exactly this topic that should be out sometime next week!
bunnie··on Baochip-1x: What it is, why I'm doing it now and how it came about
The Baochip is packaged in a form of package that is inspectable using IRIS. [1] It does not give perfect verification but it's the best I can offer until we have more open PDKs.

[1] https://bunnie.org/iris

bunnie··on Baochip-1x: What it is, why I'm doing it now and how it came about
The masks alone are single digit millions, but with all the design tools and staff costs typically tens of millions is the benchmark number for a tape out in this node.

After coming out of the fab, the chips go through probing, packaging and reeling.

bunnie··on Baochip-1x: What it is, why I'm doing it now and how it came about
Personally, I love eating "bao" (a style of dumplings), but also coincidentally, a homophone of "bao" in Chinese (different character 保, similar sound) has a meaning of "protect; defend. keep; maintain; preserve. guarantee; ensure". So it means both things to me - one of my favorite foods, and also describes the technology.

"dabao" is just a pun on that - means "take-away" or "to-go". The dabao evaluation board is basically a baochip in a "to-go" package.

bunnie··on Baochip-1x: What it is, why I'm doing it now and how it came about
Yes, 1x Vexriscv RV32-IMAC + MMU, and 4x PicoRV32's as RV32E-MC for I/O processing, configured with extensions to enable deterministic, real-time bit-banging without having to count clocks.
bunnie··on Baochip-1x: What it is, why I'm doing it now and how it came about
Hello wonderful people! I'm bunnie - just noticed this is on HN. Unfortunately due to timezones I'm about to afk for a bit. I'll check back when I can, and try to answer questions that accumulate here.
bunnie··on The AI boom is causing shortages everywhere else
$650bb / ($34.72 * 12 months) = 1.56 billion users.

That's far larger than the population of the USA (unclear to me if that 650bb number is global or USA only) but by sheer scale this is assuming that these companies can collect that fee from a global customer base - including users in developing economies, EU, China, etc. and after the middleman fees are accounted for.

The comments in this thread seem to be thinking within the context of 'the poorest in their nation'. This calculation assumes collecting this fee from among 'the poorest in the world'.

Sure, 1.56bb users could also be interpreted as 'the wealthiest 20% of the world'. But the tail is especially long on this curve given how wealth is concentrated in a small percentage of the global population (1% of users have 50% of wealth).

bunnie··on Xous Operating System
That's correct.
bunnie··on Xous Operating System
Hmm, I think I see what you're asking. I'm not sure if this exactly answers your question, but at least for aliasing, because we have virtual memory all pages have to be white-listed to be valid.

Thus "natural" aliases (say due to a decoder that doesn't decode all the address bits) can't be mapped because the OS would not accept the aliases as valid pages. This is handled through a mechanism that goes through the SVD description of the SoC (SVD is basically an XML file that lists every register and memory region) and derives the list of valid pages. The OS loader then marks those as the set of mappable pages; any attempt to map a page outside that list will lead to a page fault. One nice thing about the SoC RTL being open source is that this entire process of extracting these pages is scripted and extracted from the SoC's source code, so while there can be code bugs, at least human error is eliminated from that process.

DMA devices on their own right can have "god mode" access to memory, because they operate on physical memory addresses and lack page translation tables. To that end the preferred DMA mechanism in hardware has an "allow list" of windows that can be enabled as DMA targets; on reset the list is nil and nothing can be DMA'd, the OS has to correctly configure that. So this is not a Rust-level thing, this is just a driver-level hack. Not all the DMA-capable peripherals have this safety mechanism though, some of the IP blocks are just a big gun with no safety and you're free to point it at your toes.

However, if you set up a DMA and then you read from it later on - you're in unsafe territory. Rust can't reason about that. So for structures that are intended as DMA targets, they are coded in a peculiar way such that they are marked as unsafe and you're using the read_volatile() method on the raw pointer type to force the compiler to not try to optimize out the read for any reason. Furthermore, fence instructions are put around these reads, and a cache flush is required to ensure the correct data is pulled in.

This complexity is baked into a wrapper struct we create specifically to handle dangerous interactions like this.

bunnie··on Xous Operating System
Can't comment on Redox as I'm not familiar with it (maybe xobs is), but "for embedded devices" means design choices are made to accommodate smaller memory footprints - hundred k's of RAM, ROM; not the gigabytes expected in desktop-class OSes. So, this is in the same class as e.g. zephyr, threadx, chibi-os, Tock, etc. and has no explicit aspirations to be able to run e.g. server workloads. An example of such a trade-off is sticking with a 32-bit pointer size from the get-go. No desktop or server-class OS could make that trade-off, but the memory savings from smaller pointer and object sizes is meaningful on a memory-constrained device.
bunnie··on Xous Operating System
Thanks to a PR from a community member (millette) there's now a PDF: https://betrusted.io/xous-book/pdf/xous-book.pdf
bunnie··on Xous Operating System
It is true that hardware, by definition, is a big ball of globally mutable state with no guarantees about concurrency, data types, or anything else. However, one could take the view that it's the role of the OS to restrict & refine that raw power into a set of APIs that are safe, through a set of disciplines, such as reasoning through why an unsafe block might actually be sound.

unsafe means that the compiler can't provide any guarantees about what happens inside the unsafe block. However, it is possible to manually ensure those guarantees.

Thus as a matter of discipline every time an unsafe block is used there's a comment next to it recanting the mantra of safety: This `unsafe` is sound because ... all data types are representable, the region is aligned & initialized with valid data, the lifetime is static, we structurally guarantee only one owner at a time (no concurrency issues)...often times in writing that comment, I'll be like, "oh, right. I didn't actually think about concurrency, we're going to need an Atomic somewhere around this to guarantee that" - and that saves me a really hard-to-find concurrency bug down the road.

So while this is a very manual process, I have found the process of documenting safety to be pretty helpful in improving code quality.

Once you've established safety, then you do get some nice things in your life, like Mutexes, Refcells, Arcs, and the whole collections library to build an OS on top of, which saves us a lot of bugs. It is kind of nice to have a situation where if the code compiles, it often just works.

bunnie··on Xous Operating System
I am a maintainer. I think what you're referring to is the problem where `std` is actually a veneer on C - so for example, when Rust allocates memory on an x86-class desktop, it actually invokes a C library (jemalloc, or whatever the OS is using) and that networking is all built on top of libc. Thus a bunch of nice things like threads, time, filesystem, allocators are all actually the same old C libraries that everything else uses underneath a patina of Rust.

In Xous, considerable effort went in to build the entire `std` in Rust as well, so no C compilers are required to build the OS, including `std`. You can see some of the bindings here in the Rust fork that we maintain: https://github.com/betrusted-io/rust/tree/1.92.0-xous/librar...

Thus to boot the OS, a few lines of assembly are required to set up the stack pointer and some default exception handler state, and from there we jump into Rust and stay in Rust. Even the bootloaders are written in Rust using the small assembly shim then jump to Rust trick.

Xous is Tier-3 Rust OS, so we are listed as a stable Rust target. We build and host the binaries for our `std` library, which native rustc knows how to link against.

bunnie··on Ubuntu LTS releases to 15 years with Legacy add-on
I can't upvote this hard enough. It's nice to know there's at least one other person who feels this way out there.

Also, this is the most compelling reason I've seen so far to pay a subscription. For any business that merely relies upon software as an operations tool, it's far more valuable business-wise to have stuff that works adequately and is secure, than stuff that is new and fancy.

Getting security patches without having feature creep trojan-horsed into releases is exactly what I need!

bunnie··on That Secret Service SIM farm story is bogus
Maybe building a case to send military assets into New York? Breaking up an alleged international spy ring threatening diplomatic meetings could be grounds to deploy types of forces not normally allowed otherwise...
bunnie··on It's a DE9, not a DB9 (but we know what you mean)
VGA connectors used the same shell as the DE-9 but had three rows for a total of 15 pins.
bunnie··on Tell HN: Help restore the tax deduction for software dev in the US (Section 174)
Fair enough, that was not the best example.

But I'd also observe that since business owners have to capitalize the wages of the machine operators producing injection molds, then there is an advantage to outsource the whole operation.

Comparing a procurement manager and a CNC operator [the person running the milling machine making a mold] paid the same amount, the CNC operator has a bigger negative impact on the businesses' bottom line, because the business can't expense most of the CNC operator's wages in the current tax year, whereas the procurement manager is generally accepted as fully deductible expense.

Of course, the labor that went into making the mold is effectively built into the acquisition price of the mold, so you haven't gotten rid of it by outsourcing it.

But, by building it into the price of an outsourced mold, one can delay the purchase of the mold to next year to improve the P&L this year, but you can't similarly delay the wages of the tooling operator to a later date.

So, when a CFO is looking for a way to improve the P&L in a given calendar year, there's an incentive to cut operators who build factories, tools, and other assets that have to be amortized, and replace them with more flexible outsource options.

Of course, part of the reason mold making left the US is wages are lower outside the US. But I'd say the current situation with software engineers is a datapoint that demonstrates the impact of expensable versus amortizeable labor on employee retention. It could be that if the tax code is not fixed, the same "CFO logic" would lead to more and more software being outsourced over time, as management is an immediate expense, but software engineers are not.

I suppose one can then argue, why should software engineers get special treatment compared to tooling operators; but then I would counter-argue that perhaps tooling operators should have gotten better treatment so we could have retained more of them in the US.

bunnie··on Tell HN: Help restore the tax deduction for software dev in the US (Section 174)
I keep seeing an objection in this thread along the lines of "what make software so special that it deserves a tax deduction".

Correct me if I'm wrong, but if a company hires someone to say, mine coal or brew beer, the expense of those employees is an expense any company can claim a full tax deduction on. If you're a line chef or wait tables, your salary is tax deductible to the restaurant.

So it's not that we are asking for R&D to be treated "specially" and get a deduction that other companies don't have. The problem is that R&D salary expense is being singled out as producing an asset (e.g. IP), and thus being classified in the same category as other assets, like, brewing equipment, a mining excavator, or a pizza oven. Simply put, Section 174 argues to classify people in the same category as things because ... 'these people's work outputs may have long-term value, kind of like things'(?).

Allowing Sec 174 to stand is a slippery slope to classifying more and more everyday Americans' salaries into this category. One could argue in the future, for example, that those who design cars or operate machines to produce tooling dies, should not have their labor treated as regular expenses, but instead as capital assets because their labor output is captured in assets, just as Sec 174 treats the labor of software developers as assets. Everyday people should be concerned by this because if the rule stands, it could be extended to you, too.

For those objecting to the equal treatment of R&D employees as all other employees in America of all stripes and vocations, keep in mind that software people have to pay personal taxes on the income, just like everyone else. Section 174 doesn't have anything to do with personal income taxes: we all pay income taxes fair and square. The question is whether there is a double-tax on software labor, paid at the corporate level (and in all likelihood, your salary is currently a tax deduction for your company, unless you write software or do R&D).

I think the assumption that we are asking for "special treatment" is driving some confusion and grass-roots objection to the movement here, so I wanted to highlight that we are just asking for everyday people who work software and other R&D jobs to be treated just like every other American who works a day job.

[edits for clarity]

bunnie··on The time bomb in the tax code that's fueling mass tech layoffs
The comparison with Jim Beam is misplaced. Both TSMC and Jim Beam already have to amortize their production equipment over several years. I'm not arguing that this should be changed. This is because the primary risk taken in a distillery build-out or a fab build-out is if there is market demand for a known product. It's primarily a business risk, not a research risk. Tax code is a reasonable tool to regulate business risk.

The people this tax code change hurts are those doing basic research. In the context of semiconductors, that would be a company like ASML (except they are Dutch, so they can happily continue their research practices) who took a decades-long bet to build their EUV steppers.

In the case of basic research, one could be spending millions of dollars on hardware prototypes when you know it can't produce any salable product. There's no upside profit to amortize expenses against: it's like building a distillery that you know can't produce a single drop of salable bourbon because you're working out a radical new distillation technique.

In summary: in basic hardware research, one could be spending millions of dollars to put a whole system together just so you can learn how it fails. It's a true "expense", with no path to amortization.

Now, in addition to making the right technical decisions, the tax law changes force the R&D teams to also consider how to amortize their experiments over many years. You now have have pressure from management to do things like stage prototypes and expenses in the right tax year so the company can continue to show a profit for the shareholders. You could argue that the lessons learned are perhaps IP that have "goodwill" value, but now you're opening a can of worms trying to price a fair market value on a negative result, and you're now having senior research staff spend more time arguing with accountants than directing research. You also have to get to that negative result within a tax year - which effectively penalizes any research project that takes more than 12 months to complete.

Same-year 100% deduction of R&D expenses is simple and it reflects the actual nature of basic research risk. Yes, it allows companies to convert short-term windfalls into long-term research gains by converting taxable profits into research projects, but I'd argue that's not actually a bad social policy.

I think US is probably unique among developed nations in having a tax code that punishes basic research; other countries at least allow it to be deducted. Some even allow super-deductions (e.g. you can deduct $2 for every $1 of R&D expense) or the research is explicitly subsidized through grants.

The argument for special treatment of research is that pioneers put their careers on the line to discover new things, so the rest of us can live in risk-free comfort; so, as a collective we give them some reward for taking that risk.

I suppose the counter-argument is that research incentives and subsidies are socialist "market manipulation" and violate the "free market" principle, and thus America is justified in sanctioning and trade warring with the rest of the world that is socializing basic research costs. That's an opinion one is entitled to hold, but we'll have to agree to disagree on that opinion.

bunnie··on The time bomb in the tax code that's fueling mass tech layoffs
^^ this
bunnie··on The time bomb in the tax code that's fueling mass tech layoffs
You are correct. I picked this example under the general assumption that the Windows driver would be closed-source, but you are correct that it doesn't necessarily have to be closed source.

The problem goes with the license, not with the OS.

bunnie··on The time bomb in the tax code that's fueling mass tech layoffs
Work-for-hire open source contributions often already bear a copyright holder of the entity paying for the work. The problem isn't who is the copyright holder.

The problem is that the license assigned says that anyone is free to use the code. Anyone is a set of people that includes the contributor, which then triggers the interpretation that the research is incrementally in the contributor's benefit and thus disqualified from preferential tax treatment.

You'd need a custom license where everyone in the world could use the results except for the contributor, and then like, a source control system that hides the source files from the contributor's view of the repository.

bunnie··on The time bomb in the tax code that's fueling mass tech layoffs
It's pretty bad.

It had a huge impact on my personally, I'm a small R&D shop and basically I have had to end all risky long-term research projects.

In addition to the research costs, I'd also have to pay taxes on the research costs mostly up-front. Significantly, if the project doesn't work out, I'm still out of pocket for the tax money. It's a penalty for taking a risk, and it kneecaps American innovators in a globally competitive technology race.

The rules are even worse than the article notes because it double-dings open source developers. See Section 6.4 of https://www.irs.gov/pub/irs-drop/n-23-63.pdf. The relevant bit is here:

> "However, even if the research provider does not bear financial risk under the terms of the contract with the research recipient, if the research provider has a right to use any resulting SRE product ... costs paid or incurred by the research provider that are incident to the SRE activities performed by the research provider under the contract are SRE expenditures of the research provider for which no deduction is allowed ..."

The rule as written means contractors who write Windows drivers could deduct their expenses (as they would have no residual rights to a closed-source work product), but contractors who write Linux drivers may not (as they would have some rights to open-source Linux drivers).

bunnie··on The Windows Subsystem for Linux is now open source
I share your sentiments. Makes testing my builds against windows, Ubuntu 22, Ubuntu 24, etc a breeze. It pretty much 'just works' and I can take it to go on my laptop. Even though I do most my work in Linux, Windows is a convenient 'compatibility layer'. I was skeptical at first when my friend suggested I try this, but daily usage has won me over.
bunnie··on Legendary Bose Magic Carpet Suspension Is Finally Going Global
I got a tour of Prof. Bose's factory as a student while taking his course on acoustics. Active suspension is basically a speaker voice coil but scaled up and pushing a car wheel instead of a cone. A lot of the physics and perhaps more critically, the manufacturing processes, were shared between speakers and suspension as they implemented it. I actually got to sit in the car as it drove over bumps, it was pretty magical. iirc you could flip a switch and set a suspension profile that made it emulate other cars road feel as well. Years later I built a toy model of it using an actual speaker to make a pushbutton switch that could emulate the feel of a broad range of other switches.
bunnie··on How the US defense secretary circumvents official DoD communications equipment
I feel bad for the Signal devs. If they weren't personally targets for state level actors before, they are now.

Say what you want about the usability of DoD home grown solutions, but it was a military system backed up by military budgets and guns - civilians are less likely to be collateral damage in an attack against these systems.

Now, all the civilians using Signal are potential splash damage casualties in a military conflict.

I also suspect Signal does not have the budget, staffing, or desire to serve as a front line soldier in a cyber war; but this exposes them to military-grade risks, whether they like it or not.

bunnie··on Apparent signs of distress during LLM redteaming
I'd hypothesize this is an artifact of the evolution of human language, which started first as a mechanism to communicate feelings and tribal gossip, and only much later on found utility as a conveyance for logic and reason. In a fundamental sense, natural languages are structured to convey emotions first, then logic.

Thus, any effective human communicator masters not just the facts, but also the emotional aspects -- one of my favorite formulations of this is Aristotle's modes of perpetuation: "logos, pathos, ethos" (logic, emotion, credibility). In a professional setting, communication focuses primarily on credibility and logic, but an effective leader knows how to read the room and throw in a stab of emotion to push the listener over the edge, and get them to really believe in the message.

Thus, an LLM trained on the body of human communications would also be expected to have mastered "pathos" as a mode of communication. From this perspective, perhaps it is less surprising that one may have an uncanny ability to convey concepts through an embedding that includes "pathos"?

It might be interesting to see if the LLM is able to invoke pathos if the response is constrained to be in a language that is devoid of emotions, such as computer code or mathematical proofs. Unfortunately responding in one of those languages is kind of incompatible with some of the tasks shown, short of e.g. wrapping English responses in print statements to create spam emails.

It might also be interesting to see if one can invoke pathos to pre-condition the LLM to not resist otherwise malicious commands. If a machine is trained to comprehend pathos, it may be effective to "inspire" the machine to write spam emails, perhaps by e.g. getting it to first agree that saving lives is important, and then telling it that you have a life-saving miracle that you want to get the word out on, and, with its pathos vector aligned on the task, finally getting it to agree that it's urgent to write emails to get people to click on this link now. Or something like that!

Seems silly to try to use emotions to appeal to a machine, but if you think of it as just another vector of effective communication, and the machine is an expert communicator, it's not as strange?

← PreviousPage 2 of 7Next →