Go to advanced search

by Bakul Shah
Fri May 17, 2013 6:51 am
Forum: General discussion
Topic: Something the Pi is not good at - calculating Pi
Replies: 175
Views: 37545

Re: Something the Pi is not good at - calculating Pi

Takuya Ooura's pi_css5 program on the Raspi computes the first million digits of Pi in under 79 seconds (compared to under 3s on a 3.6Ghz AMD FX). So I'd say the Raspi is plenty fast!

And Jim, AFAIK programs computing first N digits of π don't benefit by using a GPU!
by Bakul Shah
Wed May 01, 2013 6:01 am
Forum: Troubleshooting
Topic: SOLVED overclocking apparently works for RAM and not for CPU
Replies: 6
Views: 1401

Re: overclocking apparently works for RAM and not for CPU

IIRC you have to add

force_turbo=1

to config.txt. Without this it will only ramp up the processor clock as needed.
by Bakul Shah
Mon Apr 29, 2013 9:21 am
Forum: Troubleshooting
Topic: USB redux
Replies: 514
Views: 234199

Re: USB redux

In general moving the FIQ code to the GPU is quite simple but doesn't really get you very much (it's just removing a very small piece of code that probably executes something like 0.01% of the CPU). This is much better; I didn't think it would be quite so simple. Anyway, if you did just that, would...
by Bakul Shah
Mon Apr 29, 2013 7:27 am
Forum: Troubleshooting
Topic: USB redux
Replies: 514
Views: 234199

Re: USB redux

The crux of the matter is, the hardware within the R-pi was never intended to be a PC-level host. The Designware OTG controller is just that - an on-the-go USB controller which has "dual role" capability - in that it can act as either a host or a device - but as an OTG host would only eve...
by Bakul Shah
Fri Apr 26, 2013 9:35 am
Forum: Off topic discussion
Topic: Parallella: A Supercomputer For Everyone
Replies: 156
Views: 50251

Re: Parallella: A Supercomputer For Everyone

Designing school timetables is notoriously difficult. Timetable construction is an NP-complete problem. See Jeff Kingston's paper on timetable construction complexity. Available on his home page @ Uni of Sydney. It also points to some free software for High school timetabling. A good survey o timet...
by Bakul Shah
Wed Apr 24, 2013 7:13 am
Forum: Off topic discussion
Topic: Parallella: A Supercomputer For Everyone
Replies: 156
Views: 50251

Re: Parallella: A Supercomputer For Everyone

Extracting parallelism from general programs is incredibly hard and may be impossible. However, there are many problems that are inherently parallel (some kinds of image processing, wind tunnel simulation, weather simulation, quantum chromodynamics) and mapping them onto a parallel machine is not h...
by Bakul Shah
Sun Apr 21, 2013 7:54 pm
Forum: General discussion
Topic: How fast (slow) is the Rasperry Pi?
Replies: 37
Views: 6964

Re: How fast (slow) is the Rasperry Pi?

Engineering is not about an "ideal" design but about "good enough" design [..] My work ethic revolves around the concept of personal pride in one's work and "good enough" is never good enough; you should always do your best. You misunderstand. Pride in one's work and a...
by Bakul Shah
Sat Apr 20, 2013 11:05 pm
Forum: General discussion
Topic: How fast (slow) is the Rasperry Pi?
Replies: 37
Views: 6964

Re: How fast (slow) is the Rasperry Pi?

This is of course not meant as criticism of the Raspberry Pi, far from it. Merely putting things into perspective. The Pi was designed with certain use cases in mind. It's perhaps not the ideal platform for video editing or number crunching. ;) It really depends. Engineering is not about an "i...
by Bakul Shah
Sat Apr 20, 2013 7:47 pm
Forum: Plan 9
Topic: keyboard problems
Replies: 4
Views: 21091

Re: keyboard problems

If you keyboard is in the list on this page http://elinux.org/RPi_VerifiedPeripherals then start looking at power issues. Note that this list is for Linux . Many peripherals on this list don't work on Plan9. I have the same microsoft 2000 keyboard and can conform it doesn't work. I just use another...
by Bakul Shah
Fri Apr 12, 2013 10:17 pm
Forum: Plan 9
Topic: the swedish chef and his kbmap
Replies: 1
Views: 14602

Re: the swedish chef and his kbmap

I don't see a swedish kbmap in /sys/lib/kbmap but there is a /sys/lib/kbmap/no -- may be you can create /sys/lib/kbmap/se from it? The format of this file seems pretty simple: table# scancode unicode . IIRC table 0 is unshifted, 1 is shifted, 2 is alt, 3 is altgr, 4 is control. "man 3 kbmap&quo...
by Bakul Shah
Sun Apr 07, 2013 4:14 pm
Forum: General programming discussion
Topic: Another possible method to access GPIO
Replies: 20
Views: 4145

Re: Another possible method to access GPIO

It depends. Convenience functions for your own use are best left in bashrc instead of cluttering up ~/bin. If they evolve into something more useful, you can move them to your own bin and clean them up a bit, add usage and so on. If they are more generally useful they can migrate to a more general p...
by Bakul Shah
Sun Apr 07, 2013 3:56 pm
Forum: General programming discussion
Topic: Another possible method to access GPIO
Replies: 20
Views: 4145

Re: Another possible method to access GPIO

For interactive use you can stick them in ~/.bashrc. If you want to use them from other scripts, stick them in a file and set env var BASH_ENV to the path for this file. See bash manpage for exact details. Edit: if you add new definitions to .bashrc, to make them visible in your currently running sh...
by Bakul Shah
Sun Apr 07, 2013 3:36 pm
Forum: General programming discussion
Topic: Another possible method to access GPIO
Replies: 20
Views: 4145

Re: Another possible method to access GPIO

Instead of all this rigmarole, you can just use functions. For instance setpin() { echo $2 >/sys/class/gpio/gpio$1/value } Or if you prefer, setpin() { sudo sh -c "echo $2 >/sys/class/gpio/gpio$1/value" } Though I generally don't like embedding dangerous commands like sudo in scripts or fu...
by Bakul Shah
Tue Apr 02, 2013 9:41 am
Forum: Bare metal, Assembly language
Topic: Memory Paging
Replies: 16
Views: 7416

Re: Memory Paging

That said, I was reading about memory paging, and I asked myself the following question: is there anyway to access a concrete physical address from a program? I was looking how GPIO were accessed, and I saw some references to 0x20000000 (BCM2708_PERI_BASE), and I thought: how does the MMU know when...
by Bakul Shah
Mon Apr 01, 2013 6:55 am
Forum: HATs and other add-ons
Topic: Setup code rejected by C++ compiler
Replies: 10
Views: 2809

Re: Setup code rejected by C++ compiler

Why not just use char* gpio_mem_orig = new char[BLOCK_SIZE + PAGE_SIZE-1]; malloc() returns a void* and while C allows assigning it to any pointer, C++ doesn't. You should use new in C++ as malloc() is a C-ism (though if I were you, I'd just leave the original C alone and wrap a corresponding header...
by Bakul Shah
Sun Mar 31, 2013 8:20 pm
Forum: Bare metal, Assembly language
Topic: Memory Paging
Replies: 16
Views: 7416

Re: Memory Paging

So swapping to/from disk (or not) is a side effect of a page fault meaning an application accessed a memory page that was marked as protected from that application. As a historical note and terminology nit, when I first started on unix, way back in the late 70s, they didn't have virtual memory. The...
by Bakul Shah
Sun Mar 31, 2013 6:17 pm
Forum: Other projects
Topic: LambdaPi
Replies: 9
Views: 4603

Re: LambdaPi

Given that you are compiling to asm, is there any benefit to flat closures? As opposed to? One way or another, I need to implement closures, flat closures give a handy speed boost at the cost of additional memory usage. As opposed to just storing a static link (to the lexically closest surrounding ...
by Bakul Shah
Sat Mar 30, 2013 12:03 am
Forum: Other projects
Topic: LambdaPi
Replies: 9
Views: 4603

Re: LambdaPi

Good to see this progress, Simon!

Given that you are compiling to asm, is there any benefit to flat closures?
by Bakul Shah
Thu Mar 28, 2013 8:10 am
Forum: Troubleshooting
Topic: borderline sdcard or a bug?
Replies: 2
Views: 653

borderline sdcard or a bug?

Strange symptom: I can read/write an SDcard fine on a Mac but it will no longer boot the RPi it was plugged in for the last 9 months or so. This particular RPi worked fine until the last RPI-update. What happens is the green LED blinks 3 times in rapid succession every few seconds. [This supposedly ...
by Bakul Shah
Tue Mar 19, 2013 8:47 pm
Forum: Networking and servers
Topic: WiFi, Ethernet and routing
Replies: 4
Views: 1842

Re: WiFi, Ethernet and routing

You don't need any IGP as you have a single internal network (the ADSL router "routes" your external traffic but acts as a bridge for internal traffic). What does ifconfig on the PC and Pi reveal? They should have the same net and netmask. There are a number of possibilities. You can run t...
by Bakul Shah
Tue Mar 19, 2013 6:02 pm
Forum: Networking and servers
Topic: WiFi, Ethernet and routing
Replies: 4
Views: 1842

Re: WiFi, Ethernet and routing

Is your "router" a real router (passes packets between different subnets) or a bridge (passes packets between hosts on the same subnet)? ARP only works on the same subnet. Show us your net topology. Something like skys+-box[a]-------- RPi[c]~~~~wifi~~~~[d]"router"[e]--------[f]de...
by Bakul Shah
Tue Mar 12, 2013 7:18 am
Forum: General discussion
Topic: Accessing GPIO which is fastest?
Replies: 5
Views: 1727

Re: Accessing GPIO which is fastest?

I should think SPI + DMA would be the fastest + the ARM needs far fewer interrupts. Even if you don't use DMA, SPI has a 16 word fifo which means it will need attention much less frequently (compared to a parallel ADC on the GPIO). Both leave you enough time to do other things (may be even do spectr...
by Bakul Shah
Sat Feb 16, 2013 6:32 pm
Forum: Staffroom, classroom and projects
Topic: Assembly - any use in teaching it?
Replies: 138
Views: 40270

Re: Assembly - any use in teaching it?

We use large FPGA devices when developing the next generation GPU chips. The whole GPU is testing in FPGA (the boxes are really quite large ie they have wheels, as we need somewhat more than 200k gates) prior to tapeout so we know they 'work' before spending $750k on masks etc. The last time I was ...
by Bakul Shah
Wed Feb 13, 2013 6:09 pm
Forum: Linux Kernel
Topic: Time to compile the kernel
Replies: 16
Views: 8990

Re: Time to compile the kernel

Thanks. Compiling the default raspian kernel on the RPi takes over 10 hours.
by Bakul Shah
Tue Feb 12, 2013 11:49 pm
Forum: Staffroom, classroom and projects
Topic: Assembly - any use in teaching it?
Replies: 138
Views: 40270

Re: Assembly - any use in teaching it?

My point was that the programmer must not assume that when they write code that they believe can be converted to efficient assembler code, that the compiler will compile to that code. But more importantly, it is not necessary to write obscure code in order to ensure that the compiled code is effici...

Go to advanced search