Live data from Hacker News

Intel's disruption is now complete

jamesallworth.medium.com

631–638 of 638 posts

Re: Intel's disruption is now complete

#631

Earlier quoted context omitted.

ADM64... Aka Yamhill on Intel. Holy shit I had to sign waivers and get a special Unix acount just to ACCESS the RTL model with Intel's 64-bit iHDL. I kinda laughed when AMD beat Intel to the punch not once, but TWICE. (1GHz, then 64b). I also worked on the 740, 810 and 815 (both hardware and drivers, oddly, I did a lot of stuff). Game devs HATED us for the 810/815 because it was such huge volume they had to target it…

Can you elaborate on all of that? I'm unfamiliar with "RTL", "iHDL", "740", "810", "815", I assume "LCD" is lowest-common-denominator?

Correct me if I am wrong.

RTL https://en.m.wikipedia.org/wiki/Register-transfer_level

RTL is a way to model a digital circuit and some common HW design languages are VHDL, Verilog amd Intel's proprietary iHDL.

Numbers are just Intel chipset families.

Re: Intel's disruption is now complete

#632

Earlier quoted context omitted.

You have any concrete examples of both type of countries?

"Same rules for everyone" countries: the archetype would be England after the civil war, where it became established that it didnt' matter if you were related to the King (or were the King), the law applied to you also. (Of course there are varying values of "everyone." Most countries pretty much excluded half of the adult population until recently.) For "family first" countries: this is the default mode for humans,…

“Same rules for everyone” resonates very strongly here in New Zealand. There is a book-length study [1] on our national obsession with ‘fairness’ (contrasted with the USA and ‘freedom’).

[1] https://www.goodreads.com/book/show/12112539-fairness-and-fr...

Re: Intel's disruption is now complete

#633

Earlier quoted context omitted.

Imagine a cpu that executed this sequence of instructions: r1 = r2 * r3 r2 = r3 * r4 r3 = r4 * r5 r4 = r5 * r6 On a first glance it might seem that the execution order matters because if you reorder lines in this source coxe the meaning indeed changes (e.g. the first instructions depends on an input in r2 but r2 gets a new value in the second instruction). But if you rewrite the names of the registers (variables) and…

Nice explanation. Wouldn’t mind reading more.

I'll try. On pipelining:

Most operation above a certain level of complexity can be broken down in individual smaller steps that have to happen in order and each step takes some time. Once one such step is done, the next step is performed etc.

If the logic for each of those steps is implemented in hardware, once a step is done executing, the logic just sits there idle, waiting for the next operation (composed of smaller steps) to be executed.

Pipelining is a technique that allows to make use of that otherwise idle logic to start performing the first step of the next operation.

For example, let's consider this small program:

    r3 = r1 + r2
    r2 = r3 + r1
    r1 = r3 + r4
A hypothetical CPU would execute this instruction in 12 clock cycles:

    load instruction 1
    decode instruction 1
    perform r1 + r2
    write result in r3

    load instruction 1
    decode instruction 2
    perform r3 + r1
    write result in r2

    load instruction 1
    decode instruction 3
    perform r3 + r4
    write result in r1

A pipelined execution looks like this:

    load instruction 1 
    decode instruction 1 | load instruction 1  
    perform r1 + r2      | decode instruction 2 | load instruction 3
    write result in r3   | perform r3 + r1      | decode instruction 3
                           write result in r2   | perform r3 + r4
                                                  write result in r1
and completes in 6 cycles. Once the pipeline is running at full capacity, it produces 1 result per clock cycle, achieving a 4x speedup over the naive approach above.

This example architecture has a pipeline depth of 4.

The execution is still strictly in order. The idea is that you can start doing some work for the next instruction before the previous one is fully completed.

For example, you can decode the next instruction after you decoded the current one. Also, you can perform a computation on the next instruction as soon as you have computed the results of the previous one, even before you actually have written the results in the actual destination register, provided there is additional logic that ships the result of the current operation as an operand of the arithmetic unit for the next cycle.

The maximum duration of each step is bound by the clock period. The faster the clock, the less time you have for a single step. The deeper the pipeline, the faster the clock can tick and still produce one operation per clock tick. We'll see next some of the many things that prevents us from just riding this idea to the extreme and deepening the pipeline to ludicrous amounts and harness ludicrous clock speeds.

You may have noticed that this dummy architecture here has been carefully designed so that the next instruction can consume the result of the previous instruction if the instruction stream so requires.

Imagine a different architecture that is divided in 6 steps, where the + operation itself is pipelined in two steps.

    load instruction 1
    decode instruction 1
    access r1, r2
    start +
    continue +
    write result in r3

    load instruction 2
    decode instruction 2
    access r3, r1
    start +
    continue +
    write result in r2

    load instruction 3
    decode instruction 3
    access r3, r4
    start +
    continue +
    write result in r1


    load instruction 1
    decode instruction 1 | load instruction 1 
    access r1, r2        | decode instruction 2 | load instruction 3
    start +              | access r3, r1        | decode instruction 3
    continue +           | start +  (HAZARD!)   | access r3, r4
    write result in r3   | continue +           | start +
                           write result in r2   | continue +
                                                  write result in r1
Now, here the second instructions depends on r3 which is has not yet finished computing! This is known as a data hazard. A common way out is to introduce a pipeline "stall", i.e. a no-operation step is injected in the pipeline to resolve the hazard.

    decode instruction 1
    access r1, r2        | decode instruction 2
    start +              | access r3, r1        | decode instruction 3
    continue +           | nop                  | nop
    write result in r3   | start +              | access r3, r4
                           continue +           | start +
                           write result in r2   | continue +
                                                  write result in r1
This short stall is not a full pipeline flush. Ok, so we saw a data hazard, but so far all this has been pretty straightforward.

So far we were looking at a linear instruction stream. Let's see what happens when you have a branch:

    r3 = r1 + r2
    call func1
    r1 = r3 + r4
where func1 is:

    r2 = r3 + r1
    return
Let's see what our dummy 4-stage pipeline machine would do:

    load instruction 1                   
    decode instruction 1 | load instruction 2  
    perform r1 + r2      | decode instruction 2    | load instruction 3
    write result in r3   | perform pc + 1          | decode instruction 3 (HAZARD!!)
                         | write pc=func1, ra=pc+1 | perform r3 + r4      (^^^^^^^^)
                                                   | write result in r1   (^^^^^^^^)

calling a function basically means setting the program counter (aka instruction pointer) register to point to a different location instead of the next instruction. In order to return from the function you also need to save the return address somewhere (some CPUs use a "link" register, some use the stack, here I used a return address "ra" register); the return address is the address of the next instruction in the instruction stream before jumping to the function body.

As you can see, once we set the program counter and tell the CPU that the program flow continues from another place, the work the CPU has started doing in the pipeline becomes invalid.

    load instruction 1
    decode instruction 1 | load instruction 2
    perform r1 + r2      | decode instruction 2    | load instruction 3
    write result in r3   | perform pc+1, &func1    | nop
                         | write pc=func1, ra=pc+1 | load ins func1.1
                                                   | decode ins func1.1 | load ins func1.2
                                                   | perform r3 + r1    | decode ins func1.2
                                                   | write result in r2 | read ra
                                                                        | write pc=ra
                                                  
Jumping to a different address thus incurs in additional delay, because we don't know yet where the jump is taking us until we have decoded the instruction and performed the necessary control flow adjustments.

In our dummy example this adds 2 cycle latency. Not all is lost since we can still do a little bit of pipelining, but for all intents and purposes this is a pipeline flush.

Some architectures (especially the older RISCs but it's still quite common in DSPs) work around this problem by introducing one or more "branch delay slots"; these are instructions that appear physically after a call/jump/branch instruction but get executed before the branch is actually taken.

A equivalent program for such an architecture would look like:

    call func1
    r3 = r1 + r2
    r1 = r3 + r4
where func1 is:

    return
    r2 = r3 + r1
And be executed as

    load instruction 1
    decode instruction 1    | load instruction 2 
    perform pc+1, &func     | decode instruction 2 | load ins func1.1   |
    write pc=func1, ra=pc+1 | perform r1 + r2      | decode ins func1.1 | load ins func1.2
                              write result in r3   | read ra            | decode ins func1.2
                                                   | write pc=ra        | perform r3 + r1
                                                                        | write r2
By avoiding the pipeline flush we can now complete the same task in 7 cycles compared to the 9 cycles shown above. Branch delay slots are no panacea though and modern CPU have largely moved away from them, favouring other techniques to predict whether and where a branch is likely to happen. I choose to mention branch delay slots in order to illustrate that pipeline stalls are not inherently necessary whenever branches are involved.

Stalls are ultimately caused by data dependencies. The program counter is just data, on which the instruction stream itself depends on.

(In the real world obviously things get much more complicated but you get the idea)

Re: Intel's disruption is now complete

#634

Earlier quoted context omitted.

A: Power corrupts - is not a joke. Reelection doesn't prevent corruption at all. It's a complete non-factor. B: Elected officials are supposed to be the overseeing representatives, rather than functional executives.(think board vs C-suite). Elected executive is overall a poor idea.

The person you're responding to provided a published study from Harvard as their evidence. What's your evidence he's wrong?

FFS! Incumbency is a complete non-factor in corruption. It's always the ability to increase your power, while in office.

Three countries with fairly open and competitive elections, and very high levels of corruption and high levels of incumbency:

https://www.transparency.org/en/countries/india

https://www.transparency.org/en/countries/turkey

https://www.transparency.org/en/countries/hungary

Then there are these least corrupt countries, that elect new people all the time:

https://www.transparency.org/en/countries/finland

https://www.transparency.org/en/countries/new-zealand

Oh... and let's not forget, that the study is about how efficient the governors are... not about corruption at all.

Re: Intel's disruption is now complete

#635

Earlier quoted context omitted.

I'd probably be nervous about TSMC opening a fab in AZ then

That fab will never open. Just like Foxconn's plant in Wisconsin. It'll just keep getting pushed back, and pushed back. Its job is to keep the politicians happy (or at least not angry), and it doesn't need to be built in order to serve that purpose. That fab will never, ever, ever run a single wafer.

I think in this case it's a little different because of the milsec angle and Taiwan's geopolitical role in "great power conflict" with China.

Re: Intel's disruption is now complete

#636
post #357

Earlier quoted context omitted.

> If the company is size N, they only share 1/N The graph of the distribution for value per person must be wierd, and definitely not flat. Maybe based on a power law, but I am unsure how to model the people that provide negative value, for example bad managers.

Well, the question is how much of the output they get :-) Though actually note that the classic Mancur Olson result is "the exploitation of the strong by the weak". That is, the person who has the largest share of output contributes disproportionately much to the public good. Simple proof: write individual i's marginal benefit from the company's total effort X as s_i f(X) - x_i where s_i is i's share of the output f(…

Your assumption is that the organisation is a cooperative - the employees get a share of the output of the organisation.

Intel is not a cooperative.

Fungible employees (the majority?) are paid a market clearing price (salary) for their effort. The company can derive much more value from an employee and the employee earns very little of the excess (perhaps bonuses to align working incentives).

Re: Intel's disruption is now complete

#637

Earlier quoted context omitted.

> Isn't TSMC building a fab in AZ? Yes, but the planned chips are an older generation right now and they'll be even older when the fab actually starts production. TSMC would never move cutting edge production outside of Taiwan.

It’s just such nincompoopery, people speculating about geopolitics. TSMC is owned by normal people who want to make money, if for some reason they aren’t able to trade, ownership will move out IP and put it on a USB key, and build elsewhere. Just think about it rationally. If TSMC isn’t allowed to meet demand, well of course someone will be incentivized to move the IP elsewhere where you are permitted to meet demand.…

This is a naive take on Taiwan's status and China's attitude towards it. The simple fact is TSMC being in Taiwan greatly incentivizes western powers to protect Taiwan from Chinese aggression. Everyone knows it, especially the Taiwanese government.

> Just think about it rationally.

Indeed.

Re: Intel's disruption is now complete

#638

Earlier quoted context omitted.

I have a similar theory as to why rapidly growing companies become toxic environments (of which politics and turf wars are a symptom). When a company is small and has a low profile, its employees are in it for the company. They believe in the product or service that the company is creating, and but into its mission. When the company becomes successful and starts to grow, it starts to attract people who don't really c…

> When a company is small and has a low profile, its employees are in it for the company. They believe in the product or service that the company is creating, and but into its mission. In the history of the world, 99% of people has been "in it" for the salary. Who gives a rat's ass about the company or the product?

I think just avoiding the people "willing to play politics and backstab" can be a big improvement (for employee happiness and the bottom line / shareholders)
Post reply on HN