Talk:Digital Systems: Difference between revisions

Copyright © 2017–2023 J. M. Spivey
Jump to navigation Jump to search
No edit summary
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Lecture comments from Hilary Term 2019==  
==Comments from 2022==
<i>I've inserted responses in italic font, like this, in the hope that they might contribute to a successful final third of the course next termAppreciative comments were gratefully received, but I've not generally responded to them explicitly. -- [[User:Mike|Mike]].</i>
===Suggestions about the lectures===
* I would have liked larger overviews of how each topic works before getting into more specific examples.
::''I like to go bottom-up, gathering some observations about programs that work, then reflecting on what we can learn from them.  That way we can begin with some things we can actually '''do''', even if we have to take some other things for granted.''
* More demos during lectures?  With explanation of how we could create our own on the website.
::''Demos during lectures are very time-consuming, more so than usual this year because of the difficulty of capturing them for remote participantsI like to do a bit to get you started, but really these are pointers to what you can do for yourself in the lab.''


===About the lectures===
* Explanation for each ARM instruction keyword, instead of only showing examples, as it is slightly confusing, e.g. the @lsrs@ and @adrs@.
::''Precise descriptions of each instruction are in the documentation, which is organised alphabetically by mnemonic.  It would be boring to go through all the details in lectures, rather than just what is needed to understand specific, motivating (I hope), programming examples.''
* Assembly language code examples of things written in high level language.  Also pictures.
::''The first six lectures and the first two problem sheets consist of nothing but examples of assembly language programs, usually given as a C program first.  What more could I provide?  I think that this time the need to make usable recordings inhibited me a bit from drawing impromptu diagrams on the whiteboard; sorry about that.''
* More time could be spent on the special registers and their abbreviations (e.g., @pc@ = program counter).
::''That information is contained in Lecture 2, where the three registers @pc@, @sp@ and @lr@ are named.  The special uses of the @sp@ and @lr@ registers emerge only later as our sphere of interest enlarges: the @sp@ for addressing the stack frame, and the @lr@ for holding the return address.  There are other registers accessible via the @mrs@/@msr@ instructions that we don't cover in detail but don't really need.''
* Less time could be spent on very specific features of the processor (some problem sheet questions seem to expect us to have learnt the 400 page manual).
::''Coming to terms with the documentation is an important skill, needed and sometimes even practiced by every engineer who joins an embedded software project.  You don't need to memorise all 400 pages in order to look up specific instructions, and the official and unofficial reference cards (and the rainbow chart) provide a good road map.  I don't think you should be distressed, either, if you can't find a perfect answer to every question on a tute sheet.''
* Some of the tutorial sheet questions were on something I had never seen or heard about before, wasn't in the notes and didn't have an answer online.  [I] felt like there were too many questions for which I was completely guessing / interpreting someone's poorly written stack overflow answer.
::''There's a [[The BBC micro:bit|page]] that I mentioned and showed in the lectures where all the documentation for the {{microbit}} is gathered -- the ARM core, the Nordic microcontroller chip, and the board itself.  Granted, some of the documentation is in lengthy manuals, but there are also shorter reference materials, including programming cards both official and unofficial.  One of the skills we must address in the course is navigating this huge amount of information, and that's what some of the problem sheet questions are about. And in a course where the audience has diverse experience, you should not expect to answer perfectly every question on the problem sheets, or to get benefit from every question: some question might be too trivial for you, and others might need you to draw in prior knowledge that you don't have.  And when I say "list all the instructions that set @r0@ to zero, I don't really expect a comprehensive answer, just some attempt to find out about the instruction set.''
* Possibly could improve explanation of some of the {{microbit}} interface dealing with GPIO for buttons, etc., and using/coding interrupts.
::''Examples of these are in the practical materials, leaving some things for you to find by experiment, glean from documentation, or ask us about.''


1. Do more on the operating system part.
* More on how handlers and buffers and interrupts are actually coded.
::''You have the lab sources that you can look at whenever you want detailed code that actually works.  For example, the code in @lab3-primes/primes.c@ contains code for a UART interrupt handler, code for a circular buffer, and code to set up the UART so that it generates interrupts when it finishes transmitting a character, and the Nordic and ARM reference material describes explicitly what each register does. My aim in lectures is to give you what you need to consult these other sources.''
* More detail about setting interrupt flags and how to find the documentation for them would be nice.
::''Did you miss the pointers to the Nordic documentation for the peripherals on the chip?''


{{Response|There's more we could do, I agree, and many interesting questions to explore; but there's only so much time. Some of the issues will be expanded upon in next year's Concurrent Programming course.}}
* More on C (e.g. pointers?)
   
::''You certainly have to pick up quite a lot of C from the examples, but have you seen the [[C – a very quick guide|brief guide]] to C that I adapted from a document of Andy Tanenbaum's?  It's linked from the labs page on the Wiki.  If that's not enough then I wish you'd asked a question -- in the lecture, by sending me e-mail, or by adding to the [[Frequently asked questions|FAQ]] page here.''
2. Too many questions that require searching on the internet – interesting and fun.
* More time taken with introduction to C and/or a more gradual walk through initial practicals.
::''Dry presentations of the rules of a language are not a very effective way to learn it; concrete examples make more senseDid you try asking questions about what you didn't understand?  You could use any of the routes above, or talk to the lecturer when he appears at the lab sessions.''


{{Response|Perhaps you missed some of the resources I made available to look up details: for example, the meaning of each Thumb instruction is spelled out in the ARM Architecture Reference Manual linked from the [[The BBC micro:bit|{{Microbit}}]] page, and also explained in the book by Joseph Yiu that's listed.  Yiu's style is not the same as mine, but that's a good thing, isn't it?  If there are other things that are hard to find out, perhaps you'd let me know what they are.  Did you use the opportunities to ask questions in the lectures, by adding them to the FAQ page or talk pages on the wiki, or by e-mailing them to me?  If not, you missed out!}}
* Some problem sheet questions weren't linked very clearly with the notes, so it was hard to figure them out.
::''The questions are supposed to encourage you to find things out from the documentaton, so I don't see the problem with that.''
3. Felt as though the course started in the middle – could have done with a better
* Operating systems could be taught better.
introduction in the first lecture or two.
::''Specific suggestions would be welcome.''
 
{{Response|I always find it easier to explain things on a basis that is concrete and specific, and that's why I chose not to begin with a general overview, but to encourage participants to pick things up as we explored a growing circle of machine features and instructions.  That does, I agree, leave a feeling that we are sitting in a small patch of light in the middle of a dark and mysterious forest.}}
 
4. Although [this is] a rather difficult course, [Dr] Spivey is an entertaining and informative
lecturer, who explains concepts well and is clearly very passionate. One minor
complaint would be that the lecture notes are sometimes lacking in detail, meaning I
am often confused when answering problem sheet questions.
 
{{Response|You think I'm passionate?  How disturbing!  Let me be clear about what the lecture notes are intended to be: they are the notes that I need to prepare in order to give the lecture, and I share them with the audience as an overview of what the lecture was about.  They are not intended as a complete record of everything I said, and indeed sometimes what I say is determined by what questions are asked.}}
 
5. I liked the experimental nature of the lab exercises, but I think I’d be more confident
with my work if the tasks were a bit more specific (for example the main task of Lab
3, felt more structured), otherwise good.
 
{{Response|I'm not sure whether you're saying you preferred Lab 3, or preferred the others.  The Lab exercises are, as you note, intentionally open-ended.  Some participants chose to use quite a lot of the sessions just to practise assembly language programming, and that's fine with me.  Was the problem that for Lab 2 I said, "Make the display respond to button presses," without giving explicit instructions how to do so?}}
 
6. I like that the course is taught with real hardware. We should have more discussion
about potential bugs, especially concurrency related like dead locks. Pace could be
faster. I would like demos to showcase bugs, bottlenecks etc.
 
{{Response|In some ways, the lab sessions are the opportunity to carry out demonstrations.  There are few things I find more irritating than lengthy sessions of watching someone fiddle about in front of an audience trying to get a result that was obvious from the start ...}}
7. The lectures are engaging and entertaining and concepts are not learned in detail
straight away, but they are reinforced later on.
 
{{Response|I'm glad you said this.  I suppose I'm trying to give clues about what is important, and sending you off to find out the details you need to gain a feeling of understanding.  The important things are ones we will first learn and then later use towards some other goal.}}
 
8. Course felt very well laid out and was at a good [pace]. Where I struggled was
knowing what to write down and learn precisely for the exams. Lectures felt more like
they give an understanding at topic rather than specific content to be learnt, this is
fine but a little unnerving given we are yet to see any exam questions for this topic. If
a good selection of [specimen] papers could be added to the website it would obviously
be very useful and appreciated.
 
{{Response|Yes, that is what lectures should be, because as a way of conveying 'specific content to be learnt' they are not at all effective.  There will be specimen questions to help undergraduates and tutors to know what to expect from the exam, but the questions will be set so that they can be answered by candidates who understand the concepts.}}
 
9. A wiki is very helpful with reviewing material and also including external resources
not found in lectures, but slides will be much easier to read during the lecture itself.
 
{{Response|I will aim to use about 2 or 3 slides per lecture with diagrams or code that I don't want to write out on the board before you see it.  As for the style where each paragraph becomes a slide with a handful of bullet points, see the responses I've written below.}}
 
10. Really well designed course, well explain in lectures, felt a bit ‘jumpy’ when switching
around topics in the first few lectures.
 
{{Response|I agree: we are more or less forced to choose a sequence of arbitrary-seeming programming problems in order to introduce machine instructions step by step.}}
 
11. The lecture could have introduced binary a little earlier.
 
{{Response|My impression is that most people had a basic understanding of how binary works: it's in GCSE Computer Science after all!  That's why I delayed an explicit treatment until we needed to be more precise -- especially about what happens when arithmetic overflows.}}
12. Really good.
13. Possibly the most interest[ing] course this term. [Dr] Spivey does a fantastic job at
introducing the new [topics], however, the speed of the lectures seems to remain
increasing and perhaps not allowing enough time to really digest some of the
concepts that have been introduced. Looking forward to next term.
 
{{Response|... and indeed, the course continues next term, and we can explore further those things that you've had time to digest during the vac.}}
 
14. More explanation to code! Simpler homework, less theory, more practise!
 
{{Response|I really don't know what to say in answer to this rather disturbing comment. Digital Systems is right at the 'practice' end of the spectrum of courses we offer: if it's still too theoretical for you, then I don't know what you're going to make of some of the other courses in our degree.}}
 
15. The course itself is very good and conveys a lot of knowledge. It is sometimes
difficult to comprehend the lecture not having any low-level experience before. Also
the problem sheets are disconnected from the lectures. Although I really like the
course, I feel that it may still be improved.
 
{{Response|Of course those participants with less prior experience are going to have to work harder: how could it be otherwise?  Did you use any of the provided channels for asking questions and seeking clarification?  As for the relationship between the problem sheets and the lectures, I may perceive a connection that you do not see.  Does the connection become clearer after the tutorial?  And would it help to add some more, simpler, exercises at the start of each problem sheet that did relate more directly to each lecture?}}
 
16. Lectures were confusing. It would have been helpful to have more structure e.g.
slides. Problem sheets did not always build on lectures and were sometimes very
hard to do without a lot of pre-supposed knowledge on the topic.
 
{{Response|Thanks for clarifying this -- something I have never understood before: when commenters talk about 'structure', I've always understood them to mean the large-scale structure of the course, the big argument that defines the relationship between one whole lecture and another.  But now I see that there's another kind of structure on a small scale: the flow of thoughts in a single paragraph.  And of course between the two is the structure of a single lecture, often stating and exploring a problem and then finding a solution, even if a later lecture modifies the solution and incorporates it into something bigger.  I think what you are asking for is slides to improve the perception of structure on the small scale.  The reason I rarely use them is that they would make it very difficult for me to respond during the lecture to what I get from the audience, because I would be tied to the stack of slides prepared in advance.}}
 
17. A little bit too much material was taught in short amount of time. I would have
preferred if we had less material and more examples to show us how things work.
 
{{Response|You say that there was a bit too much material, and others say the pace could have been faster: the truth is that there is no pace that suits everyone, and what I've tried to do is make sure everyone learns at least something, and maybe 80% of the class are able to follow most of it.}}


===General comments===
===General comments===
* A very interesting and well taught course.
* The notes provided are very useful.
* The labs made the material a lot easier to understand -- doing more at the start on early material would be helpful.
::''I agree, so that's why there were unofficial early sessions in the weeks before the official labs started.  Did you come to them?''
* I like having very open practicals, but more (maybe still optional) direction for projects seems useful.
::''Each lab contains specific instructions for some things you can try more easily.  After that, I hope you are driven by curiosity to do something different from others.''
* Small critique but the hypothetical users, programmers and personified processes in this course probably shouldn't be imagined as he/him by default.
::''Normally, I would personify a process in the circumstance where it "wants" to do something, but is prevented by something else -- so to get a small sample I just checked my notes (as you can do yourself here: [[Notes for Digital Systems]]), and each of the seven occurrences of "wants" is closely associated with the pronoun "it".  I'm not surprised by that, because it's what I would naturally write.  As far as I can tell, the words "he" and "him" don't occur in the notes at all.  As regards users, you will recall that our chief user, and recipient of the electronic Valentine's card with added primes, was imagined as Andrew Wiles, a male number theorist.  In the back of my mind, I maybe chose him because the idea of sending him an unsolicited Valentine's card didn't seem too creepy to contemplate.  But it might explain, if you can find any, instances where a user is glossed as he.  If you can find any other instances in the published materials, I would be glad to hear of them.  I can take little responsibility for what is heard as I give improvised explanations during lectures.''


1. This is my favourite course this term.
==Previous years==
 
* [[/2019|Comments from 2019]]
2. It is also somewhat under information I need to learn and what is just specific
regarding the micro bit, however I appreciate this is not an easy issue to solve given
that this is the first year that course has run (with [Dr] Spivey as lecturer).
 
{{Response|One thing that will help is that the exam paper will contain this [[Media:Quik.pdf|two-page summary]] of Thumb instructions, published here in advance.  So you will know what things you '''don't''' need to memorise because they will be there to look up.}}
 
3. The lecturer is very entertaining.
 
4. Perhaps utilize crochet execution to show profiling, give more insight to the how tasks
are scheduled.
 
{{Response|I really can't make sense of the first part of your comment -- can you decipher it for me?  As for scheduling, I think I said more about it after the lecture where the feedback was collected.  Do ask via the usual channels if there's anything still unclear.}}
 
5. At the request of the lecturer, it is noted he can be childish.
 
{{Response|I asked for that, didn't I?}}

Latest revision as of 16:26, 9 March 2022

Comments from 2022

Suggestions about the lectures

  • I would have liked larger overviews of how each topic works before getting into more specific examples.
I like to go bottom-up, gathering some observations about programs that work, then reflecting on what we can learn from them. That way we can begin with some things we can actually do, even if we have to take some other things for granted.
  • More demos during lectures? With explanation of how we could create our own on the website.
Demos during lectures are very time-consuming, more so than usual this year because of the difficulty of capturing them for remote participants. I like to do a bit to get you started, but really these are pointers to what you can do for yourself in the lab.
  • Explanation for each ARM instruction keyword, instead of only showing examples, as it is slightly confusing, e.g. the lsrs and adrs.
Precise descriptions of each instruction are in the documentation, which is organised alphabetically by mnemonic. It would be boring to go through all the details in lectures, rather than just what is needed to understand specific, motivating (I hope), programming examples.
  • Assembly language code examples of things written in high level language. Also pictures.
The first six lectures and the first two problem sheets consist of nothing but examples of assembly language programs, usually given as a C program first. What more could I provide? I think that this time the need to make usable recordings inhibited me a bit from drawing impromptu diagrams on the whiteboard; sorry about that.
  • More time could be spent on the special registers and their abbreviations (e.g., pc = program counter).
That information is contained in Lecture 2, where the three registers pc, sp and lr are named. The special uses of the sp and lr registers emerge only later as our sphere of interest enlarges: the sp for addressing the stack frame, and the lr for holding the return address. There are other registers accessible via the mrs/msr instructions that we don't cover in detail but don't really need.
  • Less time could be spent on very specific features of the processor (some problem sheet questions seem to expect us to have learnt the 400 page manual).
Coming to terms with the documentation is an important skill, needed and sometimes even practiced by every engineer who joins an embedded software project. You don't need to memorise all 400 pages in order to look up specific instructions, and the official and unofficial reference cards (and the rainbow chart) provide a good road map. I don't think you should be distressed, either, if you can't find a perfect answer to every question on a tute sheet.
  • Some of the tutorial sheet questions were on something I had never seen or heard about before, wasn't in the notes and didn't have an answer online. [I] felt like there were too many questions for which I was completely guessing / interpreting someone's poorly written stack overflow answer.
There's a page that I mentioned and showed in the lectures where all the documentation for the micro:bit is gathered – the ARM core, the Nordic microcontroller chip, and the board itself. Granted, some of the documentation is in lengthy manuals, but there are also shorter reference materials, including programming cards both official and unofficial. One of the skills we must address in the course is navigating this huge amount of information, and that's what some of the problem sheet questions are about. And in a course where the audience has diverse experience, you should not expect to answer perfectly every question on the problem sheets, or to get benefit from every question: some question might be too trivial for you, and others might need you to draw in prior knowledge that you don't have. And when I say "list all the instructions that set r0 to zero, I don't really expect a comprehensive answer, just some attempt to find out about the instruction set.
  • Possibly could improve explanation of some of the micro:bit interface dealing with GPIO for buttons, etc., and using/coding interrupts.
Examples of these are in the practical materials, leaving some things for you to find by experiment, glean from documentation, or ask us about.
  • More on how handlers and buffers and interrupts are actually coded.
You have the lab sources that you can look at whenever you want detailed code that actually works. For example, the code in lab3-primes/primes.c contains code for a UART interrupt handler, code for a circular buffer, and code to set up the UART so that it generates interrupts when it finishes transmitting a character, and the Nordic and ARM reference material describes explicitly what each register does. My aim in lectures is to give you what you need to consult these other sources.
  • More detail about setting interrupt flags and how to find the documentation for them would be nice.
Did you miss the pointers to the Nordic documentation for the peripherals on the chip?
  • More on C (e.g. pointers?)
You certainly have to pick up quite a lot of C from the examples, but have you seen the brief guide to C that I adapted from a document of Andy Tanenbaum's? It's linked from the labs page on the Wiki. If that's not enough then I wish you'd asked a question – in the lecture, by sending me e-mail, or by adding to the FAQ page here.
  • More time taken with introduction to C and/or a more gradual walk through initial practicals.
Dry presentations of the rules of a language are not a very effective way to learn it; concrete examples make more sense. Did you try asking questions about what you didn't understand? You could use any of the routes above, or talk to the lecturer when he appears at the lab sessions.
  • Some problem sheet questions weren't linked very clearly with the notes, so it was hard to figure them out.
The questions are supposed to encourage you to find things out from the documentaton, so I don't see the problem with that.
  • Operating systems could be taught better.
Specific suggestions would be welcome.

General comments

  • A very interesting and well taught course.
  • The notes provided are very useful.
  • The labs made the material a lot easier to understand – doing more at the start on early material would be helpful.
I agree, so that's why there were unofficial early sessions in the weeks before the official labs started. Did you come to them?
  • I like having very open practicals, but more (maybe still optional) direction for projects seems useful.
Each lab contains specific instructions for some things you can try more easily. After that, I hope you are driven by curiosity to do something different from others.
  • Small critique but the hypothetical users, programmers and personified processes in this course probably shouldn't be imagined as he/him by default.
Normally, I would personify a process in the circumstance where it "wants" to do something, but is prevented by something else – so to get a small sample I just checked my notes (as you can do yourself here: Notes for Digital Systems), and each of the seven occurrences of "wants" is closely associated with the pronoun "it". I'm not surprised by that, because it's what I would naturally write. As far as I can tell, the words "he" and "him" don't occur in the notes at all. As regards users, you will recall that our chief user, and recipient of the electronic Valentine's card with added primes, was imagined as Andrew Wiles, a male number theorist. In the back of my mind, I maybe chose him because the idea of sending him an unsolicited Valentine's card didn't seem too creepy to contemplate. But it might explain, if you can find any, instances where a user is glossed as he. If you can find any other instances in the published materials, I would be glad to hear of them. I can take little responsibility for what is heard as I give improvised explanations during lectures.

Previous years