* [libre-riscv-dev] [Bug 270] New: investigate nmigen clock gating
From: bugzilla-daemon @ 2020-03-28 14:14 UTC (permalink / raw)
To: libre-riscv-dev
http://bugs.libre-riscv.org/show_bug.cgi?id=270
Bug ID: 270
Summary: investigate nmigen clock gating
Product: Libre-SOC's first SoC
Version: unspecified
Hardware: PC
OS: Linux
Status: CONFIRMED
Severity: enhancement
Priority: ---
Component: Source Code
Assignee: lkcl@lkcl.net
Reporter: lkcl@lkcl.net
CC: libre-riscv-dev@lists.libre-riscv.org
NLnet milestone: ---
see
http://lists.libre-riscv.org/pipermail/libre-riscv-dev/2020-March/005482.html
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* Re: [libre-riscv-dev] Clock Gating (was cache SRAM organisation)
From: Luke Kenneth Casson Leighton @ 2020-03-28 14:26 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <0d35e45bd81eeaecedeb64dc5061c1e33c89630c.camel@fibraservi.eu>
On Sat, Mar 28, 2020 at 2:08 PM Staf Verhaegen <staf@fibraservi.eu> wrote:
> There is an (IMO better) alternative for what you are doing with your pass-through registers and that is clock gating (wikipedia, allaboutcircuits).
ok that's very valuable and appreciated. will reply here
http://bugs.libre-riscv.org/show_bug.cgi?id=270
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 270] investigate nmigen clock gating
From: bugzilla-daemon @ 2020-03-28 14:34 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-270-13@http.bugs.libre-riscv.org/>
http://bugs.libre-riscv.org/show_bug.cgi?id=270
--- Comment #1 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
> The principle is that you save power by not clocking the parts of the circuit
> that don't have to do any computing. I think this could be a more
> general way to only enable the stages in your pipeline who actually
> are doing computation.
ok so if i understand this correctly:
* the clock still runs at 1600mhz
* the clock runs a cyclic shift-register of length equal to the
number of stages, at 1600 mhz.
* only every *alternate* one of those elements in the shift register
is enabled (or, if you want full speed, all of them).
* through EnableInserter each stage is clocked by a *different* bit
in the shifted-register
> That said I think this feature does not fit in the MVP scope of the October
> prototype so that chip should IMO not use clock gating nor the pass-through
> register feature from the original discussion.
no, i agree, and, more to the point, we don't need it for the 180nm ASIC
(except perhaps to test the concept).
one thing that we have is, the use of OO python has the entirety of the
stages themselves *completely* separated firmly behind a general-purpose
API, where the construction of pipelines, from those stages, using entirely
different pipeline techniques, is *literally* a one-line change.
so we could conceivably do the *entire* suite of pipelines - convert them
to use this clock gating technique - *literally* in well under a day,
after first experimenting with EnableInserter and a quick and simple unit
test.
re-running the IEEE754 FP unit tests on the other hand... *sigh* :)
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 270] investigate nmigen clock gating
From: bugzilla-daemon @ 2020-03-28 16:20 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-270-13@http.bugs.libre-riscv.org/>
http://bugs.libre-riscv.org/show_bug.cgi?id=270
Staf Verhaegen <staf@fibraservi.eu> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |staf@fibraservi.eu
--- Comment #2 from Staf Verhaegen <staf@fibraservi.eu> ---
(In reply to Luke Kenneth Casson Leighton from comment #1)
> > The principle is that you save power by not clocking the parts of the circuit
> > that don't have to do any computing. I think this could be a more
> > general way to only enable the stages in your pipeline who actually
> > are doing computation.
>
> ok so if i understand this correctly:
>
> * the clock still runs at 1600mhz
> * the clock runs a cyclic shift-register of length equal to the
> number of stages, at 1600 mhz.
> * only every *alternate* one of those elements in the shift register
> is enabled (or, if you want full speed, all of them).
> * through EnableInserter each stage is clocked by a *different* bit
> in the shifted-register
Correct, the clock is the pipeline clock. In theory other parts of the CPU
could for example run at half the clock frequency. This will then naturally
automatically only committing a new operation every other cycle at maximum.
I did not test it but EnableInserter should work in simulation and FPGA.
Depending on FPGA you likely won't see the full power improvements as I think
that the enabling is implemented as an enable input to each FF and not with
gating parts of the clock tree. It will still guarantee that the output of FFs
don't change.
As said implementing clock gating for ASICs will not be a simple task.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* Re: [libre-riscv-dev] extremely busy crowdsupply update started
From: Jean-Paul Chaput @ 2020-03-28 16:44 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <8fb9dbcc812d3d7050c6e336dc9bf68f88536888.camel@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 15793 bytes --]
Hello Jock,
First, thank you for the time you spend analysing the Coriolis code and
that detailed report. I will try to make a comprehensive answer about why
Coriolis is the way it is.
* My job description at the University is not only to develop Coriolis,
but be the system admistrator of a Linux network (150 desktop &
servers) and manage industrial ASIC toolchains (Cadence,Mentor,Synopys).
So I usually can only spend 70% of my time on Coriolis.
* One problem in a tool like Coriolis is that you need three kind of
skills to really be efficient:
1. A good understanding of the specifics of making an ASIC.
2. Algorithmic knowledge to tackle efficiently the problems in (1).
3. Programming skills in at least two language C++ & Python,
plus a bit of software engineering.
So, I have knowledge in all three, but cannot became a top notch
expert in all of them. This also makes it difficult to have interns.
* In some parts, namely the detailed router, the algorithm is a genuine
one, developing and testing it is a full time job by itself. It is not
even finished yet. But, when finished it will allow lots of fancy things
like seamless analog/digital designs and taking into account fancy
constraints to avoid side-channel attacks on crypto chips (for example).
* It has a past... Some decisions where taken more than 10 years ago in
a diffrent context and I simply cannot afford to rewrite the software
every times something shift.
* Nevertheless, I'm deeply commited to write software as cleanly as possible,
and will make improvements when I can. So I will very carefully read your
observations. But, unless you want to commit yourself for the next ten years,
I need a code that I intimately understand.
> Detailed version (The Rant)
> ===========================
>
> 1. Installation
>
> Coriolis 2 can be built and installed two ways:
>
> a) inside the home directory (“Fixed directory tree”), using a helper script [1],
> b) as a package, either RPM or DEB [2].
>
> I followed the (a) route, and it actually went well except for a couple
> of quirks, that is considering the number of dependencies. As I
> understand, the (b) way is not well maintained for now.
Coriolis is too unstable yet. Using packages would meant to rebuild them
at every git push, and having the users do not forget to reinstall it
afterwards. I think Staf Verhaegen is making some trials.
Ruben Undheim, an official Debian packager, is making DEB of Coriolis,
you may contact him to see if you can set up some continuous integration
there.
My goal is to have something "stable" after the november run in 180nm.
> The method (a) can be used per se, at least on Debian GNU/Linux, or
> within chroot or LXC environments.
>
> Unfortunately, the Python extensions are coupled with the rest of the
> Coriolis, so it is impossible to use the advantages of 'virtualenv' or
> similar environments with Coriolis.
I'm not familiar with virtualenv and I don't understand how the
C++ Python modules can be separated from the Python extension themselves.
> Thus, entering the development with Coriolis for pythonistas is
> complicated by the combination of two factors:
>
> - lack of native packages for their OSes,
> - lack of PyPI package or pip/virtualenv support.
>
> I understand that Coriolis is a niche product, so we can not really
> expect much in terms of packaging for popular OSes. So it may be better
> for Coriolis to take another route:
>
> - decouple Python extensions from the main product,
> - provide Python extensions as a pip package (via PyPI or git),
> - supply a script and/or instructions for building the main product
> with the pip package.
Breaking things in multiple components introduce complexity that you
must manage afterwards. I can see a lot of troubles when people will
have mismatched versions of the C++ core and the PyPI extensions.
And lots of nigthmarish debug problems.
Native packages would be better, and can be done, once it is stable
enough.
> This is actually not a unique approach. For example, xapian-haystack
> ships a script for building a whole Xapian search engine (C++) in
> PYTHONPATH [3].
>
> 2. Documentation
> .
> All the basics are covered by Coriolis User's Guide [4] (general
> workflow and GUI) and Python Tutorial [5], that are available online
> and offline, in PDF and HTML formats.
>
> Unfortunately, Coriolis Python API don't have its own reference guide.
> There is a good reference on Hurricane C++ API [6] though. Since Python
> API just copies the C++ API (which is a terrible desicion by itself,
> see the explanation in 3.2), this reference alone has the great part of
> both C++ and Python APIs covered. But other parts of the Python API
> (most importantly, Etesian and Katana) stays undocumented beyond the
> basics.
For Etesian & Katana, this is just due to the lack of time. Also mixed
with a lack of stability. It is very frustrating to write a doc which
is no longer relevant three month later. The basic doc of Katana is
in fact in Kite. Kite is the digital only version of the router while
Katana is the mixed one. And it is in flux, so I postponed the port
of the doc.
> 3. API
>
> 3.1. Supported Python versions
>
> The Coriolis Python API is a Python 2 extension.
>
> Python 2.7 was released in 2010, and it was meant to be the last 2.x
> release back then. In the following years Python 2 had no new features
> other than backports from Python 3. As of January 2020 Python 2 is
> considered unsupported by PSF. [7]
>
> Still clinging to outdated and abandoned language and not even having a
> (publicly available, at least) transition plan seems a bit scary to me.
I understand very well. I'm not clinging to it, I just have had not time
yet to make the transition. If nothing unexpected happens I hope to do
the migration sometimes in the next three monthes. Here I must admit
I'm not proud of the way the C++/Python wrapper is written, but it do
works exactly like I want to... Here again with lots of unusual constraints
that I see no way to make swig or the like to understand.
> 3.2. Best practices of Python APIs
>
> To have a new API mimic the old API written in another programming
> language seems like an excellent idea at first. You don't have to
> design anything. Don't have to think of naming. You can reuse
> documentation and tests. The new API is easy to use, if you already got
> used to the old one. Everybody's happy, right?
>
> Well, everybody except the end users whom the new API is created for.
Not so fast here, we need a definition of "end users". In my lab,
the people using Coriolis are mostly ASIC people, that is electrical
engineers. They use the minimal and simplest possible subset of any
programming language.
You may look at the relationship between C++ and SystmeC. SystemC
is comparable to nMigen but under the form of a C++ library. They
don't event tell them it's C++. SystemC is usually presented as a
language on it's own (sometimes they talk about C).
In fact, and this is a trend I've seen emerge with the rise of FPGA
for some time, you have *two* kind of audience.
* Electrical engineers or guys comming "from the hardware", with limited
programming skills. They describe their design as series of blocks.
They want to tightly control how and what they generate.
* Computer Science types, or guys coming "from the software", with
advanced programming skills. They tend to see their design in term
of classes and functions, with lot of implicit mechanisms.
Typical example is Chisel or SpinalHDL.
At this point I have no clear answer about what the "best" language
would be. But I can tell you for sure that many "hardware guys" are
literally repelled by languages like Chisel.
It's a discussion we are currently having at the lab. Like the one
that did take place in this list a little while ago.
> Each programming language has its own best practices, and most of the
> time they either contradict the ones accepted by another language users
> or just don't have analogues in that language. Your new users will see
> your API as alien, cumbersome, or just poorly designed. They may have
> to cram their way around the least expected features. They may have to
> write wrappers around your API to reduce the astonishment factor [8]
> for the others. But most likely they will simply walk away.
Another point to take into account, is that, at first, the Python
extention was made to be able to do "rapid prototyping". That is
quicly develop and test under Python, then, convert back to C++.
So keeping both interfaces in synch as much as possible was to
reduce that work.
And, as if for myself only, I do constant back and forth between
Python and C++, so I have one less "translation" to manage.
> Here I'll try to give a run-down of Coriolis API features that scares
> Python developers (“bad”) along with their attractive and comfy
> alternatives (“good”).
>
> 3.2.1. Singletons
>
> You don't need a special methods to create and access a unique object
> in Python, since you can just import it.
>
> Bad: af = CRL.AllianceFramework.get()
>
> Good: from CRL import af
OK.
> 3.2.2. Getters and setters
>
> Getters and setters are considered an antipattern (not only in Python),
> so they should be replaced by properties or collection-like interfaces.
>
> Bad:
> env = af.getEnvironment()
> env.setCLOCK('^ck$|m_clock|^clk$')
>
> Good:
> af.env['CLOCK'] = '^ck$|m_clock|^clk$'
OK. But introduce some rework at Python/C++ level.
> 3.2.3. Data types
>
> Python use duck typing, so you should avoid any direct type indication
> or querying in Python.
>
> Bad: Cfg.getParamInt('katana.vTracksReservedLocal').setInt(6)
>
> Good: Cfg['katana.vTracksReservedLocal'] = 6
The Cfg module is a shame. Is is unecessarily separated from the rest
and the only one using boost. Creating one of the most painful
dependency only for it.
As those variables are created then stored in C++, I need to be
able to guess their type right. integer, float, sometimes enum,
and percentage... If you can show me an elegant solution, I will
take it.
> 3.2.4. Syntactic sugar
>
> It's easier to account for the certain things that goes in pairs
> (open/close, create/destroy) with context managers or decorators.
>
> Bad:
> UpdateSession.open()
> do_my_thing()
> UpdateSession.close()
>
> Good:
> with UpdateSession():
> do_my_thing()
>
> Also good in some cases:
> @update_session
> def do_my_thing():
> ...
OK. I will look into that.
> 3.2.5. Self-documenting
>
> Python have a built-in 'help()' function, that returns a docstring for
> a given object. Python C extensions can emulate a docstring for use
> with 'help()'. Static syntax checkers and IDEs also rely on this API.
>
> It is very important that this emulated docstring contains not only the
> description of the function or method, but also a signature (parameters
> and return value) in reST format, as recommended by PEP287 [9], or in
> older Epytext format at worst. This will greatly facilitate the use of
> Python C extension with modern IDEs.
>
> The rules have slightly changed since Python 3.4, but the idea remains.
The main reason here is still the lack of time. But there may be
another problem. My python interface allow to mirror in Python
the C++ function overload, but Python only allows one set of
parameters, is that true or I'm lagging on Python features again?
So how to describe a function with more than one parameter set?
> 3.2.6. Naming conventions
>
> The Python API must adhere to naming conventions accepted in Python. I
> can not stress enough the importance of this point, but let us address
> the styling issues in general in 3.3.
>
> 3.3. Styling
>
> I have to admit that Coriolis Python style is quite consistent, but it
> looks like the only purpose of this consistency is to contradict the
> PEP 8 [10] in any possible way. [11]
>
> You might think that style is not that important, but after 15 minutes
> spent in search of the 'ChipRoute' class definition, diagnosing and
> restarting IDE, checking Moon phase and whatnot, find that 'ChipRoute'
> is not a class, but a module… How well the end user could perform with
> that in mind?
Quite the opposite, I do think style is important. The goal of style
is readability and it is mine. But I don't think you can say that there
is *one* good style and all others are bad. And even the reference style
may evolve... It is easy to slip from "the style I'm accustomed to" and
"the right style". I understand the advantages of using a style shared
by many peoples, but I won't blindly comply (I'm both French and a bit
stubborn). I will try to find time to read the PEP8, but I have a lot
of work to do...
I've already seen this debate about C++ coding, and there are
definetely good and bad styles (or lack of) but I won't say there is
"the good style". Among good styles, there are different tradeoffs
that may or may not suits you.
> Another thing is that it's nearly impossible to lure a junior developer
> into a project that neglects styling. In modern development,
> proprietary and opensource alike, an ability to write a consistent,
> readable, uniform code is very much appreciated, and junior developers
> expect to acquire good professional habits in their first projects. And
> style is the first thing they learn to distinguish in someone else's
> code.
Maybe it has changed in the company world, but for what I've seen
in the ASIC world, code cleanliness is still a long way home...
But again, it may be different company we are talking about.
I talk of Cadence/Mentor/Synopsys, if you have the opportunity,
take a look.
A last reflexion about PyCharm, it is very well for people working
only on Python code. But for my part, I edit C++, C, Python, ReST,
cmake, LaTeX, Yaml and whatnot, so I use Emacs (vim could also do).
It would be inefficient to have one IDE/editor per language.
Anyway, this is very valuable input, and I will take it into
account as soon as I can, given my current workload.
Best regards,
> [1] http://coriolis.lip6.fr/pages/users-guide.html#id16
> [2] http://coriolis.lip6.fr/pages/users-guide.html#id19
> [3] https://github.com/notanumber/xapian-haystack
> [4] http://coriolis.lip6.fr/pages/users-guide.html
> [5] http://coriolis.lip6.fr/pages/python-tutorial.html
> [6] http://coriolis.lip6.fr/doc/hurricane/index.html
> [7] https://www.python.org/dev/peps/pep-0373/
> [8] https://en.wikipedia.org/wiki/Principle_of_least_astonishment
> [9] https://www.python.org/dev/peps/pep-0287/
> [10] https://www.python.org/dev/peps/pep-0008/
> [11]
>
https://www.opensourceshakespeare.org/views/plays/play_view.php?WorkID=hamlet&Act=2&Scene=2&Scope=scene&LineHighlight=1307#1307
--
.-. J e a n - P a u l C h a p u t / Administrateur Systeme
/v\ Jean-Paul.Chaput@lip6.fr
/(___)\ work: (33) 01.44.27.53.99
^^ ^^ cell: 06.66.25.35.55 home: 09.65.29.83.38
U P M C Universite Pierre & Marie Curie
L I P 6 Laboratoire d'Informatique de Paris VI
S o C System On Chip
[-- Attachment #2: Type: text/plain, Size: 177 bytes --]
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* Re: [libre-riscv-dev] extremely busy crowdsupply update started
From: Luke Kenneth Casson Leighton @ 2020-03-28 17:13 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <de619dbb67b22514be18f4a8e4282d90de502cf6.camel@lip6.fr>
On Sat, Mar 28, 2020 at 4:45 PM Jean-Paul Chaput
<Jean-Paul.Chaput@lip6.fr> wrote:
> The main reason here is still the lack of time. But there may be
> another problem. My python interface allow to mirror in Python
> the C++ function overload, but Python only allows one set of
> parameters, is that true or I'm lagging on Python features again?
> So how to describe a function with more than one parameter set?
ah.
right. with all the other things, i am going to focus on this one.
it is a major, serious failing in the ENTIRETY of the free software
community to COMPLETELY fail to comprehend this one, absolutely
critical thing.
microsoft DCOM got it right (co-classes). as a result i was the ONLY
PERSON IN THE WORLD - i checked, emailing the IEXPLORE developer and
he kindly replied - to use the full power of IEXPLORE.DLL DCOM
bindings from python-comtypes. and by "full power" i mean "all 300
objects, all 2,000+ functions, and all 20,000 properties".
the only reason that was possible - including the c++ functions which
had multiple overloads - was because of a property of DCOM called
"co-classes".
when the Mozilla Foundation decided "oh! we! know! we! will copy!
DCOM! and call it! XPCOM! it'll be great!" they did NOT copy
co-classes, and consequently fucked EVERYONE around for the next 15
years who tried to develop third party xulrunner applications.
even activestate - a major supporter of firefox technology- eventually
went "fuckit" and used webkit for their products.
eventually, with "everyone abandoning xulrunner", the Mozilla
Foundation further fucked everyone about by *abandoning* xulrunner
entirely, themselves, despite the fact that yes, there were people
actually using it. this actually resulted in a hard fork of xulrunner
(which, sadly, does not have co-classes added to it).
there is actually one feature-complete implementation of microsoft
DCOM... get ready for this... in wine! yes, really: wine has a
*complete* implementation of DCOM, to the point where you can actually
install python and python win32 comtypes *under Wine* and actually use
it!
however the barrier to entry when compiling applications using the
wine-under-linux system (executables get named MYAPP.EXE.so and you
then have to run that using winetricks....) would just blow the tops
of already-overloaded ASIC engineers overheated heads.
so whatever you pick, Jean-Paul, please be aware of two things:
1. this is a HARD problem, not properly acknowledged or recognised by
the open source community, and it's been pissing me off for 20 years.
2. whatever you choose to do, please for god's sake don't choose
wrong. the amount of pain that you will encounter will make boost
look like a sunday christmas dinner and birthday party all rolled into
one.
so if you *have* successfully mirrored multiple c++ function-overloads
into python, GREAT! congratulations, you are amongst an absolute tiny
minority of programmers who have comprehended this, where the majority
are in systematic pathological failure and mental melt-down.
l.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* Re: [libre-riscv-dev] extremely busy crowdsupply update started
From: Luke Kenneth Casson Leighton @ 2020-03-28 17:14 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <de619dbb67b22514be18f4a8e4282d90de502cf6.camel@lip6.fr>
On Sat, Mar 28, 2020 at 4:45 PM Jean-Paul Chaput
<Jean-Paul.Chaput@lip6.fr> wrote:
> Anyway, this is very valuable input, and I will take it into
> account as soon as I can, given my current workload.
i really meant it, Jean-Paul, we have some budget available from NLNet
to be able to help get some people in to help you out, here, ok?
l.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 269] auto-conversion / parser of POWER ISA Spec v3.0B
From: bugzilla-daemon @ 2020-03-28 17:35 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-269-13@http.bugs.libre-riscv.org/>
http://bugs.libre-riscv.org/show_bug.cgi?id=269
--- Comment #1 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
screw it, just decided to go with a PDFtoTXT conversion and muddle through.
started adding these, could people please look at them and review, make
ABSOLUTELY sure that they're the same as what's in the v3.0B PDF?
https://libre-riscv.org/openpower/isa/branch/
https://libre-riscv.org/openpower/isa/fixedload/
https://libre-riscv.org/openpower/isa/condition/
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* Re: [libre-riscv-dev] extremely busy crowdsupply update started
From: Michael Nolan @ 2020-03-28 18:07 UTC (permalink / raw)
To: Luke Kenneth Casson Leighton, Libre-RISCV General Development
In-Reply-To: <CAPweEDw_h8VQ3JJFF3FXph7Eg0ucVknuvMk=Xc0jSp0WP13=UQ@mail.gmail.com>
On 3/26/20 5:03 PM, Luke Kenneth Casson Leighton wrote:
>
> if you prefer just reply to this message with a paragraph or two and i
> will cut/paste it?
>
> l.
The decoder we have is based on that of IBM's [microwatt reference
design](https://github.com/antonblanchard/microwatt). Because
microwatt's decoder is quite regular, consisting of a bunch of large
switch statements returning fields of a struct, we elected not to
pursue a direct conversion of the VHDL to nmigen. Instead, we
extracted the information in the switch statements into several CSV
tables, and leveraged nmigen to construct the decoder from these
tables. We applied the same technique to extract the subfields
(register numbers, branch offset, immediates, etc.) from the
instruction, where Luke converted the information in the POWER ISA
specification to text, and wrote a module in python to extract those
fields from an instruction.
To test the decoder, we initially verified it against the tables we
extracted, and manually against the power ISA specification. Later
however, we came up with the idea of verifying the decoder against the
output of the GNU assembler. This is done by selecting an instruction
type (integer reg/reg, integer immediate, load store, etc), and
randomly selecting the opcode, registers, immediates, and other
operands. We then feed this instruction to GNU AS to assemble, and
then the assembled instruction is sent to our decoder. From this, we
can then verify that the output of the decoder matches what was generated
earlier.
We also explored using a similar idea to test the functionality of the
entire SOC. By using the [QEMU](https://www.qemu.org/) powerpc
emulator, we can compare the execution of our SOC against that of the
emulator to verify that our decoder and backend are working correctly.
We would write snippets of test code (or potentially randomly generate
instructions) and send the resulting binary to both the SOC and
QEMU. We would then simulate our SOC until it was finished executing
instructions, and use Qemu's gdb interface to do the same. We would
then use Qemu's gdb interface to compare the register file and memory
with that of our SOC to verify that it is working correctly. I did
some experimentation using this technique to verify a rudimentary
simulator of the SOC backend, and it seemed to work quite well.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* Re: [libre-riscv-dev] extremely busy crowdsupply update started
From: Luke Kenneth Casson Leighton @ 2020-03-28 18:33 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <9e50160c-5105-7a0c-0add-851dd14abb41@gmail.com>
On Sat, Mar 28, 2020 at 6:07 PM Michael Nolan <mtnolan2640@gmail.com> wrote:
> The decoder we have is based on that of IBM's [microwatt reference
> design](https://github.com/antonblanchard/microwatt). Because
fantastic, threw it in the mix. you actually have git clone
read/write access to this
https://git.libre-riscv.org/?p=crowdsupply.git;a=summary
could you see if you can throw in a couple more links or so, at least
one to the source code? i added one to the isatables page.
oh btw i am mowing my way through the pseudo-code sections of the
PDF... going cross-eyed here..
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* Re: [libre-riscv-dev] extremely busy crowdsupply update started
From: Luke Kenneth Casson Leighton @ 2020-03-28 23:16 UTC (permalink / raw)
To: Libre-RISCV General Development, Jean-Paul Chaput, Jock Tanner
In-Reply-To: <de619dbb67b22514be18f4a8e4282d90de502cf6.camel@lip6.fr>
On Sat, Mar 28, 2020 at 4:45 PM Jean-Paul Chaput
<Jean-Paul.Chaput@lip6.fr> wrote:
> > 3.2.3. Data types
> >
> > Python use duck typing, so you should avoid any direct type indication
> > or querying in Python.
> >
> > Bad: Cfg.getParamInt('katana.vTracksReservedLocal').setInt(6)
> >
> > Good: Cfg['katana.vTracksReservedLocal'] = 6
sorted. jean-paul feel free (after jock's review and highly likely
automatic reaction to put code-comments in it) to cut/paste the Config
class into coriolis2 somewhere.
hypothetically it's possible to create a nested pseudo-class which
does away with the need for the conversion of "." to "_" however i
honestly feel it's overkill: underscore looks perfectly fine to me.
btw please do fix the spelling of "edgelength" :) at least provide
both names for the same param?
https://git.libre-riscv.org/?p=soclayout.git;a=commitdiff;h=81283a7462a0623cb8b5f603be5fd96117595081
https://git.libre-riscv.org/?p=soclayout.git;a=blob;f=experiments7/utils.py;h=60057f63810942bcfce160234db1c9eafe0ba5ba;hb=81283a7462a0623cb8b5f603be5fd96117595081#l320
https://git.libre-riscv.org/?p=soclayout.git;a=blob;f=experiments7/doAlu16.py;h=1c1b61605ec9422ce9e88af57501fdbe6d9ac197;hb=81283a7462a0623cb8b5f603be5fd96117595081#l17
17 def coriolis_setup():
18 with Config(Cfg.Parameter.Priority.UserFile) as cfg:
19 cfg.misc_catchCore = False
20 cfg.misc_info = False
21 cfg.misc_paranoid = False
22 cfg.misc_bug = False
23 cfg.misc_logMode = True
24 cfg.misc_verboseLevel1 = True
25 cfg.misc_verboseLevel2 = True
26 cfg.etesian_effort = 2
27 cfg.etesian_spaceMargin = "20.0%"
28 cfg.etesian_aspectRatio = "100.0%"
29 cfg.etesian_uniformDensity = True
30 cfg.anabatic_edgeLenght = 24
31 cfg.anabatic_edgeWidth = 8
32 cfg.anabatic_topRoutingLayer = 'METAL5'
33 cfg.katana_searchHalo = 30
34 cfg.katana_eventsLimit = 1000000
35 cfg.katana_hTracksReservedLocal = 7
36 cfg.katana_vTracksReservedLocal = 6
37
38 env = af.getEnvironment()
39 env.setCLOCK('^clk$|m_clock')
40 env.setPOWER('vdd')
41 env.setGROUND('vss')
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* Re: [libre-riscv-dev] another CDC6600 reference on IEEE
From: whygee @ 2020-03-29 0:41 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <CAPweEDyB5Z5-xnGeS8suiBwgwr-WX2R5Gtrc5MCyVmrK3+p8hw@mail.gmail.com>
On 2020-03-28 07:07, Luke Kenneth Casson Leighton wrote:
> On Saturday, March 28, 2020, <whygee@f-cpu.org> wrote:
>
>> Hi !
>> I found this reference
>> https://ieeexplore.ieee.org/document/4639400/
>> I thought it might bring some insight about the scoreboard
> read mitch's book chapters.
I like to have multiple sources to compare them and enrich
the perspectives. I'm a long time Cray fanboy so don't judge me ;-)
>> but I can't read it -_-
> Date of Publication: Oct.-Dec. 1980
> woow.
That thing is historical, it should be in the public domain...
I think somebody here has access to that repository ?
yg
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* Re: [libre-riscv-dev] extremely busy crowdsupply update started
From: Immanuel, Yehowshua U @ 2020-03-29 3:14 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <CAPweEDw_h8VQ3JJFF3FXph7Eg0ucVknuvMk=Xc0jSp0WP13=UQ@mail.gmail.com>
> * yehowshua if you could write a paragraph or two about CREATE-X
Hi Luke,
Crowd Supply Update
=================
Yehowshua is a student at Georgia Tech currently pursuing a Masters in Computer Engineering - to graduate this summer. He had started working on LibreSOC in December and wanted to to get LibreSOC more funding so I could work on it full time.
He originally asked if the ECE Chair at Georgia Tech would be willing to fund an in-department effort to deliver an SOC in collaboration with LibreSOC(an idea to which he was quite receptive). Through Luke, Yehowshua got in contact with Chistopher Klaus who suggested Yehowshua should look into Klaus's startup accelerator program Create-X and perhaps consider taking LibreSOC down the startup route. Robert Rhinehart, who had funded LibreSOC a little in the past also suggested that Yehowshua incorporate LibreSOC with help from Create-X and said he would be willing to be a seed investor. All this happened by February.
As of March, Yehowshua has been talking with Robert about what type of customers would be interested in LibreSOC. Robert is largely interested in biological applications. Yehowshua also had a couple meetings with Rahul from Create-X. Yehowshua has started the incorporation of LibreSOC. The parent company will probably be called Systèmes-Libres with LibreSOC simply being one of the products we will offer. Yehowshua also attended HPCA in late February and had mentioned LIbreSOC during his talk. People seemed to find the idea quite interesting
He will later be speaking with some well know startup lawyers in have an HQ in Atlanta to discuss business related things such as S Corps, C corps, taxes, wages, equity etc…
Yehowshua plans for Systèmes-Libres to hire full time employees. Part time work on Libre-SOC will still be possible through donations and support from NL Net and companies like purism.
Currently, Yehowshua plans to take the Create-X summer launch program and fund Systèmes-Libres by August. Full time wages would probably be set around 100k USD.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* Re: [libre-riscv-dev] extremely busy crowdsupply update started
From: Immanuel, Yehowshua U @ 2020-03-29 3:15 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <0E31F037-F564-4782-A76D-CBA0E435B7ED@gatech.edu>
> He will later be speaking with some well know startup lawyers in have an HQ in Atlanta to discuss business related
** that have
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] GardenSnake.py
From: Luke Kenneth Casson Leighton @ 2020-03-29 10:40 UTC (permalink / raw)
To: Libre-RISCV General Development
i love python-ply. i love that it does embedded BNF in
comment-strings, and a lot more.
GardenSnake.py was an example of a python code-parser written *in*
python to parse a very small subset *of* python, using python-ply.
the problem is: ply is designed as a LALR parser (and yacc lexer),
where python is a *whitespace* language that completely fails to fit
standard LALR.
it therefore needed a special parser, which worked for a short
duration of time until some internal changes in ply caused it to
break. i spent this morning getting it working, and the example
succeeds! w00t!
however that's not why i'm writing (although it's cool) - it's because
these files:
https://libre-riscv.org/openpower/isa/stringldst/
all need a *whitespace* (indentation) parser in order to be able to read them.
ah.
the actual "language" is even more basic than python, however if we're
to accelerate things - and stand a chance of getting them right
without laborious checking - we need to be able to parse these
pseudo-code fragments and get them into python (and later nmigen).
so i am currently attempting to add "else" support to GardenSnake.py,
then "while", and after that it should be pretty straightforward to
convert to the power pseudo-code.
l.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* Re: [libre-riscv-dev] extremely busy crowdsupply update started
From: Jock Tanner @ 2020-03-29 10:46 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <de619dbb67b22514be18f4a8e4282d90de502cf6.camel@lip6.fr>
Hello Jean-Paul,
Thank you for such a thorough answer. I'd be happy to help without
taking too much of your time. I understand that you have a huge piece
of work at your hands. It's great that other people getting themselves
involved in Coriolis.
On Sat, 2020-03-28 at 17:44 +0100, Jean-Paul Chaput wrote:
> I'm not familiar with virtualenv and I don't understand how the
> C++ Python modules can be separated from the Python extension
> themselves.
> Breaking things in multiple components introduce complexity that
> you
> must manage afterwards. I can see a lot of troubles when people
> will
> have mismatched versions of the C++ core and the PyPI extensions.
> And lots of nigthmarish debug problems.
> Native packages would be better, and can be done, once it is
> stable
> enough.
virtualenv is a great asset for Python developer, and it strongly
influences the ways that Python software is shipped. I'll try to
elaborate.
When building native packages we usually think of Python interpreter
itself and required Python modules as system-wide dependencies with all
the version restrictions that comes out of it. When our dependencies
are few and their versions most probably matching those packaged for
the OS, it's OK. When the Python-related part of the project grows,
version mismatches becomes a hindrance.
But Python is better than that! CPython itself with all its built-in
components is totally independent of its position in the OS directory
tree. It relies on its own, mostly FHS-compliant, directory tree, which
is defined in runtime by PYTHONPATH environment variable. So
'virtualenv' and similar tools are created to manage multiple
PYTHONPATH trees on user level, switch between them, aid pip with
installing packages on them et c.
If Python package can be installed in virtual environment, it becomes
totally independent of system-wide Python packages and even the Python
interpreter itself (using pyenv). It is very convenient for developers
and users alike. That is why Python bindings are usually decoupled of
their underlying programs or libraries. For example, lxml is installed
separately of libxml2 and libxslt, but totally depends on them
installed system-wide.
Another implication is PYTHONPATH being FHS-like, that means literally
every program can be built and installed in PYTHONPATH rather than
anywhere else. For example, uwsgi is a Python application server, that
has a CPython statically compiled into itself and thus could be shipped
as a native OS package. But their creators have chosen another
approach. They made it a pip package, and as such it relies on
PYTHONPATH and supports virtualenv just for the sake of conveniency.
Their pip package, in turn, can be included in any OS repository as a
Python package by independent supporters.
To summarize. If the project consists of a native part (C/C++) and a
dynamic part (Python with C bindings), and native part can be used
without dynamic part, then it makes sense to decouple them and package
them separately: native part − as an OS package or a build script, and
dynamic part − as the corresponding dynamic language infrastructure
(pip/setuptools) suggests. It would introduce some overhead, but also
add flexibility to the process.
But if native and dynamic parts are inseparable from each other, it is
better to just ship the whole thing as a pip package.
AFAIK these approaches are prevalent in Python software development.
> Not so fast here, we need a definition of "end users". In my lab,
> the people using Coriolis are mostly ASIC people, that is
> electrical
> engineers. They use the minimal and simplest possible subset of any
> programming language.
> You may look at the relationship between C++ and SystmeC. SystemC
> is comparable to nMigen but under the form of a C++ library. They
> don't event tell them it's C++. SystemC is usually presented as a
> language on it's own (sometimes they talk about C).
> In fact, and this is a trend I've seen emerge with the rise of
> FPGA
> for some time, you have *two* kind of audience.
> =20
> * Electrical engineers or guys comming "from the hardware", with
> limited
> programming skills. They describe their design as series of
> blocks.
> They want to tightly control how and what they generate.
> * Computer Science types, or guys coming "from the software", with
> advanced programming skills. They tend to see their design in
> term
> of classes and functions, with lot of implicit mechanisms.
> Typical example is Chisel or SpinalHDL.
>
> At this point I have no clear answer about what the "best" language
> would be. But I can tell you for sure that many "hardware guys" are
> literally repelled by languages like Chisel.
> It's a discussion we are currently having at the lab. Like the
> one
> that did take place in this list a little while ago.
> =20
Both Chisel and SpinalHDL are syntactically derived from Scala. Scala
is a younger, a bit less scary sibling of Haskell. Haskell can scare
the shit out of every software engineer except those with strong
mathematical background. So I suggest it's not the best practices that
repells “hardware guys”, but a careless introduction to functional
approach in programming.
> My python interface allow to mirror in Python
> the C++ function overload, but Python only allows one set of
> parameters, is that true or I'm lagging on Python features again?
> So how to describe a function with more than one parameter set?
As a function with optional parameters.
What we have now:
class Box(object):
def __init__(self, *args, **kwargs): # real signature unknown
pass
What we could have with only positional arguments:
class Box(object):
def __init__(self, x1=None, y1=None, x2=None, y2=None):
"""
Creates a box of a given shape. If all parameters are
omitted, creates an empty box.
:param x1: starting horizontal offset,
:param x1: starting vertical offset,
:param x1:
horizontal limit,
:param x1: vertical limit,
:return:
Box object.
"""
pass
This is as neat as it can be in Python 2, but it doesn't account for
Point or Box arguments. From Python perspective, the fact that the
first positional argument can be either a single coordinate, a point,
or a box means variable reuse, and it is bad for readability. But
nethertheless we can account for that in our docstring:
class Box(object):
def __init__(self, x1=None, y1=None, x2=None, y2=None):
"""
Creates a box of a given shape. If all parameters are
omitted, creates an empty box.
:param x1: starting horizontal offset, or starting point,
or another box to copy,
:param x1: starting vertical offset, or limiting point,
:param x1: horizontal limit,
:param x1: vertical limit,
:return: Box object.
"""
pass
With Python 3.4+ we could get much better results with typing module
and Union[]. But with Python 2 without mypy that's it.
> Quite the opposite, I do think style is important. The goal of
> style
> is readability and it is mine. But I don't think you can say that
> there
> is *one* good style and all others are bad. And even the reference
> style
> may evolve... It is easy to slip from "the style I'm accustomed to"
> and
> "the right style". I understand the advantages of using a style
> shared
> by many peoples, but I won't blindly comply (I'm both French and a
> bit
> stubborn). I will try to find time to read the PEP8, but I have a
> lot
> of work to do...
> I've already seen this debate about C++ coding, and there are
> definetely good and bad styles (or lack of) but I won't say there
> is
> "the good style". Among good styles, there are different tradeoffs
> that may or may not suits you.
I can't completely agree with you on this subject, Jean-Paul. While
other languages have different style guides that evolved significantly
during their lifetimes, PEP 8 is literally the one and only Python
style guide for the last 19 years, and it has never changed, only
extended once to account for new language features. Other style guides
(Google, Khan Academy) only extend PEP 8 and other PEPs, but never
overrule them.
> Maybe it has changed in the company world, but for what I've seen
> in the ASIC world, code cleanliness is still a long way home...
> But again, it may be different company we are talking about.
> I talk of Cadence/Mentor/Synopsys, if you have the opportunity,
> take a look.
Can I really see the code you mention, or is it under NDA?
The first thing that came to mind was MyHDL [1]. I think their code is
quite clean and idiomatic.
> A last reflexion about PyCharm, it is very well for people working
> only on Python code. But for my part, I edit C++, C, Python, ReST,
> cmake, LaTeX, Yaml and whatnot, so I use Emacs (vim could also do).
> It would be inefficient to have one IDE/editor per language.
Speaking of JetBrains products, Pycharm is indeed not suited for C/C++
development. CLion, on the other hand, has a Python plugin that has all
the features of Pycharm CE, and also a first-class cmake support. I
tried CLion at a small C project, and it went perfect. But alas, CLion
is a non-free product. [2]
Now if I were tasked with setting up an environment for long-scale
hybrid C/C++/Python development I would try Eclipse with CDT and PyDev
plugins. It may lack a bit in features and usability, but it's free.
As for other formats like reST, JSON, LaTeX et c., all the IDEs handle
them well either out of the box or via plugins.
As for Emacs, I've read some posts [3] and watched some videos, and I
must say I'm not impressed. It may seem from the description that all
the plugins do a decent job, but the whole system completely lacks
consciousness, or you may call it multitasking abilities, and the
screen is very inexpressive. The editor just reacts on keystrokes, and
that's all. Like you're supposed to manually start syntax check, style
check, static analysis. Then fix problems and start again, and again.
It is really looks tedious, and boring, and error-prone.
On the contrast, when I open a file in Pycharm, it immediately starts
all the checks on it and gradually (it may take a second on a decent
machine) highlights all the real or possible problems in the
background. Critical things are bright red. Syntax errors.
Uninitialized variables. Unresolved imports. Non-criticals are pale
yellow or greyish. Call arguments not matching callee's signatures.
Variables that may be uninitialized. Unused code. Style problems. Human
language syntax errors.
I can scroll, type, switch between files, and still I see all the
results of this background work simultaneously.
Eclipse's PyDev can also do static check while you type [4], but the
list of possible warnings seems shorter than Pycharm's, and the result
is less esthetically pleasing for my taste.
So, Jean-Paul, I would really like you to try either IDE on a real code
and tell me what you think.
[1] https://github.com/myhdl/myhdl/
[2]
https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000477130-How-to-handle-a-mixed-Python-C-C-project
[3] https://www.fullstackpython.com/emacs.html
[4] https://www.pydev.org/manual_adv_code_analysis.html
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* Re: [libre-riscv-dev] extremely busy crowdsupply update started
From: Luke Kenneth Casson Leighton @ 2020-03-29 11:22 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <24756f54d28bd109e0bf1613acbf868d268e262b.camel@gmail.com>
On Sun, Mar 29, 2020 at 11:46 AM Jock Tanner <tanner.of.kha@gmail.com> wrote:
> On Sat, 2020-03-28 at 17:44 +0100, Jean-Paul Chaput wrote:
> > At this point I have no clear answer about what the "best" language
> > would be. But I can tell you for sure that many "hardware guys" are
> > literally repelled by languages like Chisel.
> > It's a discussion we are currently having at the lab. Like the
> > one
> > that did take place in this list a little while ago.
> > =20
>
> Both Chisel and SpinalHDL are syntactically derived from Scala. Scala
> is a younger, a bit less scary sibling of Haskell. Haskell can scare
> the shit out of every software engineer except those with strong
> mathematical background. So I suggest it's not the best practices that
> repells “hardware guys”, but a careless introduction to functional
> approach in programming.
that, and the fact that the rocket-chip developers (from Berkeley)
claimed to "reduce code size significantly" in the two following ways:
1. pretty much absolutely f***-all in the way of comments.
2. make heavily depth-nested use of classes and mix-ins [with ZERO
documentation].
the first major exposure to a real-world industry-class processor
written with the Chisel system, and it's one of the worst (best)
introductions on how *never* to write (un)maintainable (un)useable
code i've seen in 43 years of programming, with the exception of some
hilarious perl and php scripts.
i'd _really like_ to give you good examples of code written in Chisel: i can't.
the more important thing, than Chisel, is, as Jock points out: scala
simply isn't popular.
https://www.infoworld.com/article/3270626/python-scala-climb-the-ranks-of-language-popularity.html
http://pypl.github.io/PYPL.html
scala remains at 0.97% - less than one percent - by way of how pupular
language tutorials are searched for.
python on the other hand is *right at the top* - with a whopping 30%.
so i know you picked SpinalHDL for vexriscv:
https://github.com/SpinalHDL/VexRiscv
however, i would be particularly interested to hear your thoughts on,
for example this:
https://github.com/SpinalHDL/VexRiscv/blob/master/src/main/scala/vexriscv/plugin/MulSimplePlugin.scala
versus this:
https://github.com/lambdaconcept/minerva/blob/master/minerva/units/multiplier.py
just on an *instinctive* level, which one is easier to read?
from a style perspective: *six* levels of indentation-bracing?
really?? and using "=" to indicate type-declaration (val
aSigned,bSigned = Bool), where every other language uses it for
assigmnent? and the "implicit return result" by assigning to a
variable with the same name as the function? i mean, they should have
made it more difficult than that.
it's just... flat-out.... NO. anyone writing code in this language is
*deliberately* making their life hell, and, worse, if the chip becomes
a commercial success (or an academic success) the insanely high
barrier to entry will make it extremely costly to find programmers.
... lesson learned? :)
l.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* Re: [libre-riscv-dev] GardenSnake.py
From: Luke Kenneth Casson Leighton @ 2020-03-29 11:35 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <CAPweEDy0Ds=iik3nxtO1HdoGyt9c4SeysYFDrdqqo-65_7UtdQ@mail.gmail.com>
https://git.libre-riscv.org/?p=soc.git;a=commitdiff;h=990d2e93d339d9138a7f6a96910e2ed89ed960c8
eeeee! while loops! eeeeee!
:)
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* Re: [libre-riscv-dev] extremely busy crowdsupply update started
From: Jock Tanner @ 2020-03-29 13:23 UTC (permalink / raw)
To: Luke Kenneth Casson Leighton, Libre-RISCV General Development,
Jean-Paul Chaput
In-Reply-To: <CAPweEDyxRTJk1bx_eB0mQx29hd6Oh93ANWMOUVz8j39-FPUFaQ@mail.gmail.com>
Luke,
I think this code won't always work as intended:
p = Cfg.getParamInt(attr) # all params have a type
if p.type == 'Enumerate':
Cfg.getParamEnumerate(attr).setInt(val)
else:
Cfg.getParamInt(attr).setInt(val)
If the parameter named 'attr' is already defined, 'p.type' will be set
according to its type. But for undefined parameters 'p.type' will be
what we ask for, i. e. always 'Int'.
BTW I think it is useless to have a distinction between 'Int' and
'Enumerate' types, as well as between 'Double' and 'Percentage'. But
it's another thing.
On Sat, 2020-03-28 at 23:16 +0000, Luke Kenneth Casson Leighton wrote:
> On Sat, Mar 28, 2020 at 4:45 PM Jean-Paul Chaput
> <Jean-Paul.Chaput@lip6.fr> wrote:
> > > 3.2.3. Data types
> > >
> > > Python use duck typing, so you should avoid any direct type
> > > indication
> > > or querying in Python.
> > >
> > > Bad: Cfg.getParamInt('katana.vTracksReservedLocal').setInt(6)
> > >
> > > Good: Cfg['katana.vTracksReservedLocal'] = 6
>
> sorted. jean-paul feel free (after jock's review and highly likely
> automatic reaction to put code-comments in it) to cut/paste the
> Config
> class into coriolis2 somewhere.
>
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* Re: [libre-riscv-dev] extremely busy crowdsupply update started
From: Luke Kenneth Casson Leighton @ 2020-03-29 13:46 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <c7dd1af5bd41de5895ad938ec1c0e98caf585ced.camel@gmail.com>
On Sun, Mar 29, 2020 at 2:23 PM Jock Tanner <tanner.of.kha@gmail.com> wrote:
>
> Luke,
>
> I think this code won't always work as intended:
>
> p = Cfg.getParamInt(attr) # all params have a type
> if p.type == 'Enumerate':
> Cfg.getParamEnumerate(attr).setInt(val)
> else:
> Cfg.getParamInt(attr).setInt(val)
>
> If the parameter named 'attr' is already defined, 'p.type' will be set
> according to its type. But for undefined parameters 'p.type' will be
> what we ask for, i. e. always 'Int'.
yes i'm assuming that etesian.something is already pre-defined, and
can be detected as being of type "Enumerate".
l.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] Building Docker Containers
From: Immanuel, Yehowshua U @ 2020-03-29 13:48 UTC (permalink / raw)
To: Libre-RISCV General Development
We really need to start building docker containers for our setups. Not saying we have to develop in docker, but be can use it as a checkpoint reference.
With my experience in software development, it can be easy to forget how you set something up if it goes unused.
Especially setting up GCCPPC which is kinda tricky - I’m quite good and fast at doing Docker - so I might be able to squeeze this in if anybody has any workflow checkpoints they’d like me to freeze.
Yehowshua
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* [libre-riscv-dev] [Bug 271] New: SigDecode in power_fields has extra spurious fields
From: bugzilla-daemon @ 2020-03-29 14:50 UTC (permalink / raw)
To: libre-riscv-dev
http://bugs.libre-riscv.org/show_bug.cgi?id=271
Bug ID: 271
Summary: SigDecode in power_fields has extra spurious fields
Product: Libre-SOC's first SoC
Version: unspecified
Hardware: PC
OS: Linux
Status: CONFIRMED
Severity: enhancement
Priority: ---
Component: Source Code
Assignee: lkcl@lkcl.net
Reporter: lkcl@lkcl.net
CC: libre-riscv-dev@lists.libre-riscv.org
NLnet milestone: ---
hi michael,
SigDecode has had these added to it:
comb += self.x_s.eq(self.df.FormX.S[0])
comb += self.x_sh.eq(self.df.FormX.SH[0:-1])
comb += self.dq_xs_s.eq(self.df.FormDQ.SX_S[0:-1])
DecodeFields itself is where i was intending to be the canonical location
for adding these kinds of things. if you feel that they should be
added as signals, then we should do them in an automated fashion,
because otherwise, after a hundred instructions are added, SigDecode
will be jammed with almost 200 signal fields... *all of which were added
by hand*.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* Re: [libre-riscv-dev] Building Docker Containers
From: Luke Kenneth Casson Leighton @ 2020-03-29 15:26 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <E5B4C4E3-3402-41B8-8D6F-F3D060FDB023@gatech.edu>
On Sun, Mar 29, 2020 at 2:48 PM Immanuel, Yehowshua U
<yimmanuel3@gatech.edu> wrote:
> We really need to start building docker containers for our setups.
no. sorry.
i'm on a mobile broadband connection.
docker FORCES massive downloads onto people, through "overlays" over
which you have absolutely no control, even on a day-by-day basis.
my brother dan asked me to install couchdb for him, in a kubernetes container.
a simple recompile - which should have been a matter of under 2
megabytes - turned into a nightmare 1 GIGABYTE download - over my
stepfather's mobile internet connection - thanks to a quotes new
release quotes of the kubernetes API from google.
he's over 70, retired, on pension, and me using up his mobile
broadband quota and forcing to have to pay a massive 40 GBP extra that
month: this is not acceptable.
so NO.
we are *not* developing code that is for the exclusive domain of the wealthy
https://www.linuxjournal.com/content/line-length-limits
"There's very little chance that Alastair's patch will make it into
the kernel. Linus Torvalds is very strict about making sure Linux
development does not favor wealthy people. He wants developers working
on ancient hardware to have the same benefits and capabilities as
those working with the benefit of the latest gadgets."
it's the same thing here.
docker is for "fixed deployment and release". it will be
"appropriate" (not reallly) to release docckkkaaaah files once we have
stable releases. however given the complete lack of stability,
versioning inside docker itself, and the complete and utter lack of
security in its design, you'd need to twist my arm one hell of a lot
before i *reluctantly* agree to its use for this project.
now if _someone else_ wants to do docker files, they're more than
welcome - and learn how useful they really are. however they're
absolutely *not* going onto the FTP server: it's only a 12 GB
partition and it's 60% used already.
regarding building of gcc for powerpc: if you're doing that, there's
something wrong. gcc is *already* available as cross-compiled debian
packages. i have these installed:
ii binutils-powerpc64-linux-gnu 2.34-5
amd64 GNU binary utilities, for
powerpc64-linux-gnu target
ii cpp-6-powerpc64-linux-gnu 6.3.0-18cross1
amd64 GNU C preprocessor
ii cpp-8-powerpc64-linux-gnu 8.4.0-1cross1
amd64 GNU C preprocessor
ii cpp-9-powerpc64-linux-gnu 9.2.1-28cross1
amd64 GNU C preprocessor
ii cpp-powerpc64-linux-gnu 4:9.2.1-3
amd64 GNU C preprocessor (cpp) for the
ppc64 architecture
ii g++-6-powerpc64-linux-gnu 6.3.0-18cross1
amd64 GNU C++ compiler
ii gcc-6-powerpc64-linux-gnu 6.3.0-18cross1
amd64 GNU C compiler
ii gcc-6-powerpc64-linux-gnu-base:amd64 6.3.0-18cross1
amd64 GCC, the GNU Compiler Collection
(base package)
ii gcc-8-powerpc64-linux-gnu 8.4.0-1cross1
amd64 GNU C compiler (cross compiler for
ppc64 architecture)
ii gcc-8-powerpc64-linux-gnu-base:amd64 8.4.0-1cross1
amd64 GCC, the GNU Compiler Collection
(base package)
ii gcc-9-powerpc64-linux-gnu 9.2.1-28cross1
amd64 GNU C compiler (cross compiler for
ppc64 architecture)
ii gcc-9-powerpc64-linux-gnu-base:amd64 9.2.1-28cross1
amd64 GCC, the GNU Compiler Collection
(base package)
ii gcc-powerpc64-linux-gnu 4:9.2.1-3
amd64 GNU C compiler for the ppc64
architecture
likewise qemu,
we *don't need* to build gcc for powerpc from scratch... because we're
*specifically aiming for POWER9 interoperability*.
we _will_ need a simulator, we will need llvm-ir back-end patches, and
more besides, however docker containers are the worst, most
resource-wasteful and unstable way you could possibly choose.
i take a *snapshot* of the debootstrap chroot(s) that i create
(including the pre-downloaded packages which end up in
/var/cache/apt/archives), thus saving a huge amount of bandwidth, then
run scripts in those which install (and build) the packages and
binaries needed.
this is a stable method that is also upgradeable - *both under my
control not at someone else's whim*.
ok?
please, seriously, don't drink the docker kool-aid, ok?
best,
l.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* Re: [libre-riscv-dev] Building Docker Containers
From: Immanuel, Yehowshua U @ 2020-03-29 16:03 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <CAPweEDxJUJM8YVhv895QjBQndSpFWy4V+-oHcUhMBT+v_4NLPQ@mail.gmail.com>
Haha - well Georgia Tech where I am is more or less like an ISP so I have Gigabit internet when on campus - so no problems here.
I haven’t used chroot in years so I can look into that - I’ve just always had a good experience with containers for snapshots.
Yehowshua
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
* Re: [libre-riscv-dev] extremely busy crowdsupply update started
From: Immanuel, Yehowshua U @ 2020-03-29 16:05 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <de619dbb67b22514be18f4a8e4282d90de502cf6.camel@lip6.fr>
It sounds like Coriolis Python-C++ API isn’t the best. I know this isn’t super easy to do, even with help from tools like Swig.
HOWEVER, given that we have direct access to Jean Paul - that’s a big benefit at the moment.
Yehowshua
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
^ permalink raw reply
page: next prev latest
Libre RISC-V Mailing list Archives (accessible via public-inbox)
Archives are clonable: git clone --mirror https://inbox.libre-soc.org/libre-riscv-dev
Example config snippet for mirrors
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git