Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
BobHoward
Feb 13, 2012

The only thing white people deserve is a bullet to their empty skull

eschaton posted:

how bad is the stuff on OpenCores?

variable

it might help to calibrate your expectations that one of the biggest companies/contributors to opencores is the outfit behind kncminer

Adbot
ADBOT LOVES YOU

movax
Aug 30, 2008

i used a can core from them once, it was fairly decent

Tin Gang
Sep 27, 2007

Tin Gang posted:

showering has no effect on germs and is terrible for your skin. there is no good reason to do it
currently planning to try getting sound output from a microcontroller. I think I'll use an msp430 to read sound data in AU format from an SD card and output everything to an external DAC

welp that's the tin gang half-baked electronics project update hope you liked it

Sapozhnik
Jan 2, 2005

Nap Ghost

no dont

Sapozhnik
Jan 2, 2005

Nap Ghost
also if you want an external dac then a functional block that speaks i2s is what you want

Sagebrush
Feb 26, 2012

au does that thing when they move stuff around to fill in empty parts of the spectrum right? like compression but not really

that seems like a fun thing to implement (not)

Sagebrush fucked around with this message at 19:18 on May 9, 2016

ynohtna
Feb 16, 2007

backwoods compatible
Illegal Hen
ya mean dithering?

JawnV6
Jul 4, 2004

So hot ...

Mr Dog posted:

a functional block that speaks i2s is what you want

big shtick energy
May 27, 2004


some people using some really scrub tier micros when Stm32F4 discovery boards (with built in debugger) are only $20 and have everything you need, including the ability to develop with eclipse and gcc

maybe I'm biased because it's what we use at work and is by far the least awful tool chain and kit I've used for embedded work

JawnV6
Jul 4, 2004

So hot ...
building a C simulator for riscv is taking:
docker for riscv-tools
plus a jdk
plus scala
plus sbt

all of the java-ish ones are happily shuffling their versions around. i tried the native install on the latest ubuntu docker image, that wouldn't install the tools so chalk up at least one undocumented dependency.

Sapozhnik
Jan 2, 2005

Nap Ghost
lol docker and ubuntu

i'm sorry

surely this stuff ought to work on grown up versions of linux like centos though. docker is extremely bad

JawnV6
Jul 4, 2004

So hot ...
ive tried on:
1) cygwin (lol no)
2) OS X (ISA tools built fine, chisel/rocket simulator failing very early)
3) ubuntu image

so far a pre-packaged riscv-tools image (by a docker engineer, not ISA wonk fwiw) is working alright, it's just clear that the chisel/rocket/fpga portions have never been run outside the berkeley campus

ive used docker for tensorflow before, it's nice to have a toolchain like that not sprawling across my real machine

Sapozhnik
Jan 2, 2005

Nap Ghost
well, install a centos image or at worst a debian image idk

don't use ubuntu, so many things are pointlessly different and nothing works.

BobHoward
Feb 13, 2012

The only thing white people deserve is a bullet to their empty skull

DuckConference posted:

some people using some really scrub tier micros when Stm32F4 discovery boards (with built in debugger) are only $20 and have everything you need, including the ability to develop with eclipse and gcc

maybe I'm biased because it's what we use at work and is by far the least awful tool chain and kit I've used for embedded work

avr is least bad 8 bit uc precisely because you can just use gcc but there are steadily fewer reasons to not just arm it up as you say

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

JawnV6 posted:

ive used docker for tensorflow before, it's nice to have a toolchain like that not sprawling across my real machine

docker or vagrant or anything to keep awful toolchains from making GBS threads up your host os

had too many windows installs ruined by visual studio

JawnV6
Jul 4, 2004

So hot ...
whoops, spoke too soon, make debug with known-good riscv-tools install just ended with this:
code:
g++ -O1 -std=c++11 -I/usr/local/include -I/home/rocket/rocket-chip/csrc -I/home/rocket/rocket-chip/dramsim2   -c -o /home/rocket/rocket-chip/emulator/generated-src-debug/Top.DefaultCPPConfig-3.o /home/rocket/rocket-chip/emulator/generated-src-debug/Top.DefaultCPPConfig-3.cpp
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.9/README.Bugs> for instructions.
<builtin>: recipe for target '/home/rocket/rocket-chip/emulator/generated-src-debug/Top.DefaultCPPConfig-0.o' failed
make[1]: *** [/home/rocket/rocket-chip/emulator/generated-src-debug/Top.DefaultCPPConfig-0.o] Error 4
make[1]: *** Waiting for unfinished jobs....
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.9/README.Bugs> for instructions.
<builtin>: recipe for target '/home/rocket/rocket-chip/emulator/generated-src-debug/Top.DefaultCPPConfig-1.o' failed
make[1]: *** [/home/rocket/rocket-chip/emulator/generated-src-debug/Top.DefaultCPPConfig-1.o] Error 4
make[1]: Leaving directory '/home/rocket/rocket-chip/emulator'
Makefile:29: recipe for target 'Top.DefaultCPPConfig.debug.o' failed
make: *** [Top.DefaultCPPConfig.debug.o] Error 2
idk why you think centos is going to be 'better', the best clue i have is that i need "whatever OS was installed on the berkeley CS machine s141.millennium in 2014"

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

JawnV6 posted:

idk why you think centos is going to be 'better', the best clue i have is that i need "whatever OS was installed on the berkeley CS machine s141.millennium in 2014"

hating ubuntu is just dog whistle racism

Sapozhnik
Jan 2, 2005

Nap Ghost

JawnV6 posted:

idk why you think centos is going to be 'better', the best clue i have is that i need "whatever OS was installed on the berkeley CS machine s141.millennium in 2014"

Because Red Hat Enterprise Linux is run by grown-ups who have paying customers that get upset if you yolo your own system infrastructure for no good reason and break their poo poo in the process, and Ubuntu Linux is run by Mark Shuttleworth.

JawnV6
Jul 4, 2004

So hot ...
the guide specifically calls out the Ubuntu packages to get, so this does feel like disconnected whistling wholly apart from my actual problem

Sapozhnik
Jan 2, 2005

Nap Ghost
If the software stack's documentation explicitly calls out Ubuntu Linux as its preferred host environment then yes you should use that. My condolences, then.

big shtick energy
May 27, 2004


I'm getting the sense that the RISC-V guys will need some help from an adult if they want their poo poo to be used in the real world.

JawnV6
Jul 4, 2004

So hot ...
1) all the ISA stuff is fine. if i just wanted to run linux on qemu or do SPIM-ish stuff, i've got 3 functional copies of that
2) i could recreate 90% of my advanced architecture course and i think that's the goal, running it outside the ucb eecs dept is a stretch goal

Spatial
Nov 15, 2007

looks like we've got some microcontroller designers in here? help a brother out

i'm wondering how the BFI instruction is implemented in ARMv-7M MCUs. it's a bitfield insert op, any number of bits in any position in one cycle. i want the equivalent in my own design since it's very handy for the embedded stuff I'm working on.

best method i came up with so far uses 3x 32-bit barrel shifters and 3x logic ops:
- generate mask using lsb extending left shift: 1 <<< (field width - 1)
- rotate bitfield right by field lsb
- AND NOT bitfield with mask
- AND input with mask
- OR bitfield with input
- rotate left by field lsb

all well and good. but i'd rather not use three shifters if i could get away with it. it's all existing hardware in the design except for that last rotation. is there some clever trick I'm not thinking of?

JawnV6
Jul 4, 2004

So hot ...
smask = 1 <<< (width -1)
sbits = Rs & smask
dmask = smask << lsb
dbits = sbits << lsb
Rd = rd & (!dmask)
Rd = rd | dbits

you need three shifts in pseudocode. one to generate the mask, one to move the mask for the destination, one to move the source bits to the destination lsb.

the one that seems the most amenable to a hardware cheat is generating the mask. you could also get clever around the replacement, software has to use the correctly-shifted destination mask where you could just club the bits together and drop the original bits from Rd

JawnV6
Jul 4, 2004

So hot ...
the fpga-targeted generated-src rocket risc-v core is something else

a single 2MB .v, here's a typical section:
code:
  assign io_out_bits_payload_addr_block = T78;
  assign T78 = T85 ? io_in_4_bits_payload_addr_block : T79;
  assign T79 = T84 ? T82 : T80;
  assign T80 = T81 ? io_in_1_bits_payload_addr_block : io_in_0_bits_payload_addr_block;
  assign T81 = T49[0];
  assign T82 = T83 ? io_in_3_bits_payload_addr_block : io_in_2_bits_payload_addr_block;
  assign T83 = T49[0];
  assign T84 = T49[1];
  assign T85 = T49[2];
the xilinx tools chewed through it alright, and I'm starting to put together a test bench to run it in icarus

BobHoward
Feb 13, 2012

The only thing white people deserve is a bullet to their empty skull
mask generation w/o barrel shifters idea: use decoders and something akin to ripple carry

msbi is the index of the mask msb, lsbi the index of the lsb

msb_onehot = decode(msbi)
lsb_onehot = decode(lsbi)

now you have two bit vectors the same width as your data/mask/etc. put these through something that is structured like a ripple-carry adder. a traditional full adder cell is:

assign sum = a ^ b ^ cin;
assign cout = (a && b) || ((a ^ b) && cin);

what you want instead is:

assign sum = cin || a;
assign cout = sum && !b;

where the 'a' bits are connected to bits of the lsb_onehot vector, and 'b' are connected to msb_onehot. now your 'sum' contains ones starting at the lsb position and rippling up until terminated by the msb position.

if you're targeting fpga, in xilinx you can take advantage of the carry chain designed for implementing adders to make this ripple carry like structure super fast, but you will have to instantiate library cells as synthesis typically won't infer the carry chain cells unless you're actually doing an addition. there's probably an equivalent way to use the carry chain in altera, but i haven't used altera in a looooonng time

i would still test this against the more straightforward barrel shifter approach to make sure it is actually better. pretty sure it should be more space efficient, there might be a crossover in combinatorial delay dependent on word size

spankmeister
Jun 15, 2008






you people are wizards

Bloody
Mar 3, 2013

someone recommend me a microcontroller for system monitoring. i think all i really care about is having a fuckoff lot of ADCs but i am open to many interpretations of "system monitoring" and stuff

i have some default answers for this in mind but im interested to see what other people would use

movax
Aug 30, 2008

whatever is the least amount of effort from a sw pov (toolchains, etc)

every mcu out there can do that easily

how does it integrated into the system? could also get a big gently caress-off spi adc/system monitor chip and talk to it also with literally any mcu

Sagebrush
Feb 26, 2012

yeah, i would tend to say "whatever you already know" unless this is a hobby project and you want to learn something new for some reason

like, absent all other considerations, i would say "an arduino plus the aforementioned SPI ADC" because there's nothing quicker and easier than that

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

spankmeister posted:

you people are wizards

Bloody
Mar 3, 2013

in my inbox: "microchip acquires atmel"

:rip:

Tin Gang
Sep 27, 2007

Tin Gang posted:

showering has no effect on germs and is terrible for your skin. there is no good reason to do it

Bloody posted:

in my inbox: "microchip acquires atmel"

:rip:

two great tastes that go great together, imo

JawnV6
Jul 4, 2004

So hot ...
arduino running on PIC would be awful tho

Sagebrush
Feb 26, 2012

pics are garbage for grognards stuck in 1995

Dairy Days
Dec 26, 2007

theyre good actually

Poopernickel
Oct 28, 2005

electricity bad
Fun Shoe

Sagebrush posted:

pics are garbage for grognards stuck in 1995

lol, just lol if your processor's compiler costs money for a non-poo poo version

GCC fo lyfe

Poopernickel
Oct 28, 2005

electricity bad
Fun Shoe

Microchip's Actual Website posted:



movax
Aug 30, 2008

Bloody posted:

in my inbox: "microchip acquires atmel"

:rip:

i thought this happened last year, or is now 100% official official?

Adbot
ADBOT LOVES YOU

Fanged Lawn Wormy
Jan 4, 2008

SQUEAK! SQUEAK! SQUEAK!
y'know I was justing thinking about the microchip atmel thing on the way to work the other day and wasn't sure if it had every actually happened.


boo

  • Locked thread