00:00:00 --- log: started forth/04.05.09 00:20:20 --- join: [aXe] (~axe@pcp03956119pcs.sarast01.fl.comcast.net) joined #forth 00:20:21 --- quit: [-aXe-] (Read error: 104 (Connection reset by peer)) 00:59:19 --- quit: kc5tja ("THX QSO ES 73 DE KC5TJA/6 CL ES QRT AR SK") 01:02:59 --- join: Serg (~knoppix@193.201.231.126) joined #forth 01:19:09 hi serg 01:19:11 --- quit: [aXe] (Read error: 104 (Connection reset by peer)) 01:19:14 --- join: [aXe] (~axe@pcp03956119pcs.sarast01.fl.comcast.net) joined #forth 01:19:24 heya-a-a! 01:20:02 how's your work, forth etc... ? 01:20:59 i just bought an air rifle w/ optical sight ;) so i hit twice farther than w/ open sight 01:26:37 --- join: crc (~Charles_C@0-1pool176-7.nas6.philadelphia1.pa.us.da.qwest.net) joined #forth 01:33:56 heh 01:34:26 im working on the web page for isforth compliant with the spec 01:34:30 got most of it done 01:34:43 4.5 mm cal., 170 m/s by papers, 4x34 sight 01:34:58 nice 01:35:12 cool 01:35:28 i'm split-minded about isForth 01:35:50 from one point, i seem it conceptually ze best of Linux ones i tryed 01:37:04 but from another side, it's way fat, unstandard, hmm... 01:38:31 the fat will become more potional when i can metacompile 01:38:41 also, alot of the fat is VERY VERY usefull 01:38:53 but unless you know its there and how to use it its useless to you 01:39:00 which is where my present task comes in 01:39:05 documenting it all 01:39:06 sure ! 01:39:36 i think you do Forth for yourself, not for community... 01:39:41 plus i dont consider a 50k executable that can do everything isforth does to be fat :) 01:39:46 both 01:39:59 ull see, when isforth can do everything i want it to be able to do.... 01:40:30 unstandart features hit portability both of coder's skills and source codes 01:41:13 who cares about portability? 01:41:21 this is already locked on x86 AND on linux 01:41:51 and i dont give a flying fsck about producing anything thats portable because its a comlete and utter MYTH anyway 01:41:53 :) 01:42:26 myth ? no, you da-a-amn wrong ! 01:43:03 i test Perl script on Windoze and then send to provider's FreeBSD and it does exatly what i want ;)) 01:43:37 theres no such thing as portable code. any time you show me portable code ill show you lots of red tape visual clutter glue conditional compilation 01:44:10 what you realy have is 284765928456982 different versions of the same thing with the sources to all those versions interleaved into a totally unreadable BLOB within the same source files 01:44:23 isforth does not and will NEVER support conditional compilation 01:44:28 not ever 01:44:34 unless someone pays me to add it :P 01:44:40 ;)) 01:44:45 lol 01:44:54 its not the principal, its the MOONEY!!! 01:44:57 lol 01:45:06 i stole that off somone i knnow :P 01:45:13 the blob clutter is wrotten by bad coders ;)) 01:45:37 * I440r points /you in the direction of 2904865924765978236459786294564293 billion bad coders 01:46:12 good projects are made better way - universal in one filezz, machine-dependendat - in specific dirs 01:46:34 tell linus that 01:46:53 there isnt a linux kernel source 01:46:57 theres a linux kernel sources 01:47:16 ??? 01:47:28 its like the old joke the MD of pepsi told about coke not being able to say "coke is it" they have to say "coke ARE it" 01:47:48 i seen it in DJGPP compiler and Allegro GFX lib, in free ZIP 01:48:09 so, what the way linux kernel is written ? 01:48:24 i looked slightly but don't recall 01:48:50 i avoid looking in those areas 01:48:58 its badly formatted and totally uncommented 01:49:03 and thus CLOSED source 01:49:25 LOCKED src ;)) beyond seven seals ;)) 01:49:35 :) 01:49:54 iz ze phrase correct grammarly ? 01:50:16 eek! 01:50:20 look at the time lol 01:50:24 i need to go zzz 01:50:32 i didnt realise its like almost 5 am lol 01:50:38 g'nite ;)) 01:50:47 i dunno it looks like it could be right :) 01:50:59 g'morning, LOL ;)) 01:51:00 only the "elete" get to read those sources and understand them 01:51:13 "it was hard to write, therefore it should be hard to read" 01:51:23 which is an attitude im diametrically opposed to 01:51:42 easy to code, easy to grok ? 01:53:40 yes but "difficult to code == MUST be explained in full" 01:53:51 both in the documentation AND in the comments 01:54:18 dont give up on isforth, i do still consider her to be in beta 01:54:28 ;)) 01:54:36 anyway zzzzz (snort!) 01:54:49 bye ! 02:08:13 hey 02:08:21 hi 02:08:21 * mur was thinking forth yesternight 02:08:28 ;)) 02:08:37 and that you thought out ? 02:08:39 about having library 02:08:49 so there were humane commands 02:08:58 like library "mylib" . 02:09:12 . would execute, and 2 and parameter and one is opcode 02:09:21 library of what ? 02:09:23 2nd 1st 02:09:25 umm.. 02:09:36 well then there was more structuralised system 02:09:46 linguistic to program 02:10:06 like select canvas of window2 . 02:11:18 hmmmm.... 02:11:27 way far from my interests 02:13:12 more human readable sourcecode 03:11:50 --- join: qFox (C00K13S@cp12172-a.roose1.nb.home.nl) joined #forth 03:22:05 --- quit: Serg (Read error: 60 (Operation timed out)) 03:24:54 --- join: Serg (~knoppix@193.201.231.126) joined #forth 03:30:44 --- quit: Serg ("Leaving") 03:57:17 --- quit: qFox ("this is mirc's last attempt of communication...") 05:37:50 --- join: tathi (~josh@pcp02123722pcs.milfrd01.pa.comcast.net) joined #forth 05:37:50 --- quit: crc (Read error: 104 (Connection reset by peer)) 06:17:13 --- quit: tathi ("leaving") 07:27:44 --- join: qFox (C00K13S@cp12172-a.roose1.nb.home.nl) joined #forth 07:47:14 Hi 07:51:21 HI TEH ROBRET!!!1 07:51:48 HAI 07:51:56 Someone's in a forthy mood todat. 07:51:58 today 07:52:06 Forthy!!! 07:52:17 What did you take? :) 07:53:10 https://sourceforge.net/projects/forthy 07:54:59 Sexy 07:56:25 muppets and robbets 07:57:10 mur: Do you use the letter 'å' in Finnish? 07:58:06 no 07:58:19 Bah, heathensö 07:58:23 er, -ö :) 08:00:20 I'm thinking of adding prefix and postfix delimiter parsing to Forthy. 08:21:23 heathen's island 08:28:39 madgarden> what happens if you type a space ot the end of a line in your forth? 08:30:46 Nothing. 08:31:02 what would be the difference? 08:31:19 Difference, of what? Not sure what you're asking. 08:31:24 [17:00:12] I'm thinking of adding prefix and postfix delimiter parsing to Forthy. 08:32:09 --- join: fridge (~hovil@CommSecureAustPtyLtd.sb1.optus.net.au) joined #forth 08:32:19 Oh. I mean, you'd be able to register delimiter parsing steps, say making " a postfix delimiter. So then, you could do stuff like this: 08:32:19 print"No space at the start" 08:32:45 oh, then i didnt understand you right :) 08:32:49 :) 08:32:59 Just a way to have more control over the syntax. 08:33:01 but um 08:33:14 doesnt the delimiter prefix word have to take care of that anyhow? 08:33:26 thats how i imagined implementing it in my forth 08:33:46 like, ( would just put the input locator to the next char after ) 08:33:49 The delimiter postfix word would be print" 08:34:13 " is part of the word, but also behaves like whitespaces. 08:34:28 hm yes, but i still dont see the use of it really 08:34:28 So parsing continues directly after the " 08:34:36 I just showed you an example. 08:34:54 Otherwise, you'd be doing this: 08:34:54 print" Space at the start" 08:35:00 brb, must get cleaned up 08:35:17 hmmm, do you mean a seperate word that just scans for the next " and puts the input buffer pointer ahead, so you wont have to do it in a parsing word every time? 08:35:29 hmm 08:35:50 ok i think i get it :) 08:37:09 but then, C" hi" would "kind of" become C hi" ,because the first " is stripped leaving the executing word C (which would do the same as C" in this case) 08:37:47 --- join: kc5tja (~kc5tja@66-74-218-202.san.rr.com) joined #forth 08:37:48 it could work i guess 08:37:54 --- mode: ChanServ set +o kc5tja 08:41:42 qFox: Hey. Not sure if you read the channel logs or not, but the Kestrel has changed yet again. Due to various reasons, I've decided to eschew the 65816 processor, and place a MISC processor of my own design in. 08:42:13 kc5tja> nah i dont read the logs :) 08:42:34 but ok... that tells me very litte tbh :) 08:42:42 I figure, since I'm spending all this money (or, will be, more accurately) on custom logic investments, I might as well go all the way and custom design the CPU to the precise bus specifications I need too. 08:42:56 :) 08:42:59 Well, the P24 is a MISC processor, right? 08:43:11 Expect the Kestrel's CPU to be more similar to the P24 than to the 6502. 08:43:27 if you say so. those details go past me. its information i dont really need 08:43:34 ah 08:43:42 that i can use :p the p24 is hell easy 08:44:16 I'm rather shocked that you didn't know the P24 is classified as a MISC-architecture CPU. I thought it would have been very well documented as such. 08:44:18 compared to the x86, trying to port my little forth program but geez, i forgot the significant differences between p24 asm and x86 asm :p 08:44:46 well, i dont even know what MISC-architecture means. i know its cpu related, but thats about it 08:44:57 remember, i'm not the hardware guy :) 08:44:58 Minimal Instruction Set Computer. 08:45:02 oh 08:45:11 ok i'll be shaming myself in that corner now. 08:45:13 versus RISC -- Reduced Instruction Set Computer. 08:45:21 versus CISC -- Complex Instruction Set Computer. 08:45:29 P24 is MISC, PowerPC is RISC, and 80x86 is CISC. :) 08:45:32 x86 - dont even try? :) 08:45:55 well ok, the 6502 was cisc? 08:46:09 Actually, with the sole exception of the limited set of registers, x86 assembly is vastly easier than VAX-11 assembly. 08:46:27 never even messed with that, but i'll take your word for it :) 08:46:42 how many registers and stacks will your cpu have? any specs in mind? 08:46:43 6502 was technically CISC, but it was built like a RISC machine. It had very few instructions, but lots of addressing modes. It also had RISC-like performance. 08:46:51 and how deep do you think the stacks will be? 08:47:02 Two registers: A and B, used for addressing memory. 08:47:24 There will be two stacks, each 33-bits wide: one for data, one for return. Both are 16 elements deep. 08:47:43 cant possibly make the return stack double of that? ;) 08:48:00 i noticed i use alot of return stack depth in my program, and thats just parsing and stuff... 08:48:23 I can make it double that, but it uses up chip resources to do so. 08:48:39 i'm sure i can do with less (And i dont believe i cross the 16 stack depth) but there's also the user that could use the return stack etc... 08:48:40 (and I haven't even selected a chip yet, so I'm kind of designing for minimum cost right now) 08:48:45 ah true 08:48:50 --- join: Serg (~knoppix@193.201.231.126) joined #forth 08:49:18 The thing is, if you need the return stack depth, you can also perhaps consider manually "spilling" the return stack to memory. 08:49:23 well for a real misc, you can do with a subset of the p24 instructions 08:49:50 yes, thats a speed vs .... stackdepth matter 08:49:53 Most RISCs, for example, don't even *have* a stack in hardware, and implement what basically turns out to be a single-cell return "stack" for subroutine handling. So I know it's possible. 08:50:18 storing/retrieving just takes a couple more instructions (and, i imagine, would be slower then a hardware stack) 08:50:30 qFox: Well, the instruction count I'm looking at right now is roughly in the 40 to 50-ish range, which is too much. 08:50:38 I'm simplifying things still. 08:50:38 yes, boombox told me the x86 emulates the stack with the memmory too 08:51:02 Well, it's a true stack -- it just resides outside of the CPU. 08:51:24 (and therefore, is easy to access like an array, which leads to all sorts of interesting problems and solutions) 08:51:27 i'd say the p24 set is a good guideline. if you have instructions to spare there are a few fast shortcuts i can reccommend :p 08:51:46 recommend 08:51:52 Go ahead and e-mail me your recommendations at kc5tja at arrl dot net. 08:52:06 Here is what I have so far: 08:52:24 Program flow: JMP, JZ, JC, CALL, SYS, RET, NOP 08:52:37 Arithmetic: +, -, *+, /-, NEG 08:52:47 qFox, re but then, C" hi" would "kind of" become C hi" ,because the first " is stripped leaving the executing word C (which would do the same as C" in this case) 08:52:59 The " isn't stripped. 08:53:14 It's just treated like whitespace. 08:53:18 Logical: AND, OR, XOR, COM, 1<<, 2<<, 4<<, 8<<, 16<<, 1>>, 2>>, 4>>, 8>>, 16>> 08:53:21 madgarden> ah ok 08:53:21 So... C"hi" 08:53:28 But, the word in the dict is still C" 08:53:47 Load/Store: @A, @A+, @B, @B+, !A, !A+, A!, B!, A@, B@, R@, >R, R>, SPR!, SPR@ 08:53:57 Stack: DUP, OVER, SWAP, DROP, NIP, ROT 08:54:14 Lots of instructions, most of them put there for convenience reasons. 08:54:23 kc5tja> jc = jump if carry set? sys i dont know. those <<>> can be done away with by just adding shr/shl imo. spr!/@ i dont know. nip i should know but dont :\ 08:54:52 and where is your literal instruction? 08:54:55 qFox: Well, if you're going to be doing graphical stuff, you want fast shifts and rotates. 2* 2* 2* 2* 2* 2* 2* 2* is 8 cycles, while 8<< is only 1. 08:55:03 jc is jump on carry set, yes. 08:55:25 SPR@/! are fetches and stores to CPU-specific "special purpose registers," which control various aspects of the CPU without additional instructions. 08:56:08 For example, I was thinking of making A and B two SPRs, but then loading and storing to them would take two cycles, not one, so I re-introduced A!, A@, B!, and B@ as separate instructions, since they're so heavily used. 08:56:23 NIP is equivalent to SWAP DROP 08:56:29 ah ok 08:56:37 it drops the 2nd top of stack, not the 1st top of stack. 08:56:51 A! A@ is ST LD, how do you put something from T to A/B ? 08:57:11 A! and A@ will store T in A, or fetch A into T, respectively. 08:57:17 oh 08:57:18 You're thinking of !A and @A 08:57:27 i guess so, my mistake :) 08:57:27 Store-with-A and fetch-with-A. 08:57:41 Yeah, it's confusing, but it's also intended to be hidden by the system's Forth compiler too. 08:57:45 :) 08:57:47 true 08:58:02 you could, to save instructions.... only allow direct memmory storing/fetching via reg A 08:58:12 opencores has come a long way from when I last checked 08:58:16 Also, it is a word-addressed machine, like the P21/P24. Consequently, it has 4.2GB, but each "byte" is 32-bits wide! 08:58:24 understood 08:58:31 makes it easier though 08:58:32 So, all total, it addresses 64GB of 8-bit equivalent memory. 08:58:51 however, you "could" add C@ C! equilavents (uh or something :) 08:58:58 equivalent 08:59:01 * qFox cheats 08:59:22 Well, that's one reason why I wanted all those shift operators; to expidite sub-field accesses. 08:59:31 come again? 08:59:38 But then, after I came up with them, I recalled the PowerPC's most God-like instruction: rlwini. 08:59:58 It's a mouthful, but it does a rotation, a masking, then if you want, a shifting. :) 09:00:09 In short, it's a bit-field extraction instruction. 09:00:15 well, you have 32bit cells. what size instruction were you thinking about? 09:00:31 The instructions are 6-bits wide, packed 5 across in a single cell. 09:00:47 ok 09:00:56 Not sure what to do with the remaining 2 unused bits, but I'm thinking of making them the least significant bits of a 7th instruction. 09:01:09 err, 6th instruction rather. 09:01:34 imo, you can do away with the jnc, i havent come up with any use for it just yet 09:01:36 Capable of holding NOP, JMP (what you'd normally use), RET, or SYS. 09:01:38 --- join: tathi (~josh@pcp02123722pcs.milfrd01.pa.comcast.net) joined #forth 09:01:46 I use it constantly. 09:01:49 ohyes, whats sys? 09:01:56 Oh, sorry. 09:02:20 SYS is a software interrupt -- it is basically a compact short-hand for invoking a system call. It's literally equivalent to CALL $00000010. 09:02:29 ok 09:02:43 It's faster (one cycle instead of two), and more compact (6 bits instead of 44). 09:02:55 In all other respects, it behaves exactly like CALL. 09:03:31 for the instructions to add... add ZERO, to put a 0 on the stack. or a ONE if you prefer dupdupxor for 0. 0 and -1 can be done in 4 and 5 instructions, but 1 takes up lit and the next XT 09:04:45 and for protection reasons i kind of resented using ldp (!A+) for this, as you might be reading from non-existent or illegal space... 09:04:51 so to speak 09:05:08 Well, now you're treading into SPR territory. :) 09:05:13 oh 09:05:19 I've got plans to release a future version of the processor with an integrated MMU. 09:05:19 ok then :) 09:05:40 Working on the Kestrel again? 09:05:53 I want it powerful enough to run something like Linux. Not saying that I will port Linux (I'll leave that to someone else to try), but that's my goal. 09:06:11 tathi: Yes. Gone is the 65816 processor. A stack CPU will now be at its heart. 09:06:32 awesome. 09:06:39 i've been busy on my math all day. derivatives make this look so easy suddenly :p 09:06:59 Wait until you get into integration; derivatives will be trivial in comparison. :) 09:07:16 "the PowerPC's most God-like instruction" :) Yay rlwinm! 09:07:19 well dont know the dutch term for that, but i'm sure i'll come accross it 09:07:34 only halfway now 09:07:39 qFox: inverse operation of the derivative. 09:07:45 oh... goody :\ 09:07:52 integration is the process of finding the anti-derivative. 09:08:13 tathi: :) 09:08:26 I should read up on rlwinm again, to see what ideas I can leech from it. 09:08:37 And how I might be able to implement it in the MISC core. 09:09:03 yeah, I'm not sure how that would work, seeing as it has five operands... 09:09:13 --- quit: fridge (Remote closed the connection) 09:09:27 I'd probably make each "sub-step" of the rlwinm dataflow a separate MISC instruction. 09:09:37 i was thinking btw. in math, when one finds a certain algoritm to solve/prove something, its free to be used by anyone. no charges, no copyright, nothing. in programming when someone thinks of a certain algoritm, he or she holds some kind of copyright for it.... however imo you can compare the two as being sort of the same 09:09:52 That would keep the stack usage low, but at the cost of run-time performance (OTOH, it'd be easier to drive to higher clock speeds) 09:09:56 except mathimatical algoritms arent appealing to the public, so to speak 09:10:10 --- join: fridge (~hovil@CommSecureAustPtyLtd.sb1.optus.net.au) joined #forth 09:10:13 but its kind of odd 09:11:07 anyways, i'll try to setup a 6bit instruction set with 2 regs. 09:11:08 qFox: This is the whole crux of the patent problem with respect to software. It's a loophole in the patent system that is being exploited, and lots of people are making money off of it. Software patents are *EVIL* and have done *FAR* more harm to restrict industry growth than anything Microsoft could have done to date. 09:11:09 yeah, rlwinm seems kind of counter to the RISC concept, IMO 09:11:40 yep, i had the same idea 09:11:42 tathi: But at the same time, it is the epitome of RISC, too -- all it does is exploit the already existing data path through the PPC's ALU. 09:12:50 kc5tja: Oh. OK, never thought of it that way. Makes a lot of sense though. 09:15:26 :) 09:15:48 It seems to be simple enough, from what I'm reading. 09:15:53 http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixassem/alangref/rlwinm.htm 09:16:10 I would definitely break this up into 3 separate instructions though. 09:16:21 --- quit: Serg ("Leaving") 09:16:22 kc5tja> looking from a p24 point of view, will you allow manipulation (read/change) of the I and P registers? 09:16:28 One for rotation, one for bitmask generation, and the final AND. 09:16:41 the current instruction word in the cpu, and the adr of the next instruction word 09:16:42 qFox: What are the I and P registers? 09:16:58 ^ 09:16:59 instruction latch and program counter? 09:17:02 yes 09:17:06 Well, P is changed via JMP, CALL, RET, etc. No point in making that an explicit operation. 09:17:22 The I register is off-limits to the programmer though, since it's value is constantly changing on each clock cycle. 09:17:37 k, no reading either? 09:17:45 Why would you want to? 09:17:53 dont know. just curious 09:17:54 :) 09:18:01 perhaps for debugging purposes 09:18:20 The state of the I register is deterministic to the point where you can literally push a literal constant on the stack to represent the state of the I register at the time the LIT is executed. :) 09:19:23 I might, in the future, introduce a "return from interrupt" instruction which reloads the I register with a value on the return stack (this is required to handle, for example, page faults or other access violations). 09:19:54 and, will it have T S and R registers like the p24 has? these are readonly (in fact, i'm not sure if those werent just for the theory...) 09:20:06 T is top of datastack, S is NOS, R is top of return stack 09:20:20 Those "registers" are not programmer visible, even in the P24. 09:20:31 ye was just realizing that :p 09:20:34 They are used only to explain what's going on inside the chip. 09:21:05 However, the architecture of a MISC will always have those "registers," and I will also be using those theoretical registers to explain the operation of the instructions. 09:24:19 tathi: Actually, I don't need a separate instruction to generate the bitmask. That can be computed using existing means. I didn't realize that rlwinm used fixed constants to generate the bitmask with. 09:24:26 So really, the only thing I need is the rotation. 09:25:57 qFox: In light of the conversation between me and Tathi, I'm thinking of changing the shift instructions around a bit. Basically have 2* and 2/ for single-bit shifts, then have a general purpose << and >> for shifts, and <- and -> for rotations. 09:26:26 so shifting something by 5 bits would be like: 5 nop nop << (or something like it). 09:26:44 The nop's would give the shifter enough time for the data to propegate through the shifter unit. 09:26:56 hmmm 09:27:16 perhaps, instead of a whole range of instructions for that 09:27:29 you can do << >>, and the next instruction would be the argument 09:27:35 No. 09:27:48 Zero-operand is a most holy goal. 09:27:49 or something..? :) 09:27:50 Trust me. 09:27:53 ok 09:28:00 It *really* simplifies the CPU design to have *everything* on the data stack. 09:28:16 same thing... 09:28:20 well, same idea 09:28:33 or was that what you meant 09:28:43 The only instruction that takes its operand from the I register are JMP, JC, JZ, and CALL. Those are the only four instructions to do so. 09:29:15 and literal? 09:29:17 oh 09:29:21 nm thats not I 09:29:40 Nope. It takes the literal from memory at P, then increments P. 09:33:36 Yes, I like this idea. A lot. 09:33:38 Consider it done. 09:33:39 :) 09:34:12 << >> taking argument from the stack? 09:34:20 They take two arguments. 09:34:26 << ( n sh -- n< >> ( n sh -- n>>sh ) 09:34:31 oh right 09:34:32 yes 09:34:58 Same thing with <- and -> (rotate instructions, not shift). 09:35:18 ok, and um, why *+ and /- ? 09:35:33 isnt * / faster? 09:35:56 or am i reading it wrong 09:36:00 * and / take hardware resources that may make it impossible to program the processor on cheap FPGAs. 09:36:23 Otherwise, you'd be correct, having a real * and / instruction would be much faster. 09:36:48 But, still, *+ and /- would be rather fast too. Certainly MUCH faster than implementing the shift-and-add or shift-and-subtract algorithms by software alone. 09:37:13 hmmm you mean like, S*T+x, where x is from an external device? 09:37:41 No. I mean the multiply step instruction, as found in the P21 and P24. 09:38:44 oh, so *+ is not a complete multiplication 09:39:02 Nope. Just a single bit. 09:39:24 right 09:40:06 i've never grasped the whole external hardware thing from the p24 (since i never had to implement it ;) 09:41:04 It's really not that hard. Each hardware device has a limited amount of memory -- called registers -- that not only store values, but *do* things when you write to them. 09:41:31 That is, the very act of writing data to them causes the hardware to actually undertake some action. In most cases, that action depends on the value being written. 09:41:39 Sometimes, actions can also occur when reading from a register too. 09:41:47 (usually things like clearing interrupt pending bits and the like) 09:47:51 but in the p24, you could only shift one bit per instruction to, and read one bit from it 09:48:01 with shr and div, i think 09:48:49 I don't think we were talking about the same thing. 09:48:53 Please start over. 09:50:35 for some reason, the whole http://www.eforth.com.tw/academy/sutra/chapter9.htm thing is gone 09:50:44 i saved it somewhere on my laptop though, hold on :) 09:52:46 or did i... 09:55:22 Add the S register on the data stack to the T register. If the addition produces a carry place the sum in T, otherwise leave T unchanged. The T-A register pair is now shifted to the left by one bit. Carry is shifted into A(0). 09:55:27 (for div) 09:55:30 Hmm, I now have 43 instructions listed. 09:59:14 Down from 47 10:00:38 oh right i was composing a list 10:02:42 is it possible to add a * or / in just one instruction? 10:02:44 SYS is gone. 10:02:51 i mean, wouldnt that increase speed alot? 10:03:03 in general 10:03:11 Not without MASSIVE hardware resources. 10:03:50 hm ok, pity 10:04:05 And the faster you want it, the more hardware it'll take. 10:04:25 --- join: SDO (~SDO@co-trinidad1a-156.clspco.adelphia.net) joined #forth 10:04:32 For example, a 32 by 32 multiplier will require 4096 AND gates at a *minimum* to implement, not counting all the intervening adders as well. 10:04:51 re SDO 10:04:56 hm, right 10:05:01 hello kc5tja 10:05:07 SDO: The Kestrel will no longer use the 65816 for its CPU. 10:05:13 In its place will exist a MISC core. 10:05:39 Well, Chuck won't think it'll be MISC, but compared to RISC, it's definitely a vast improvement. :D 10:05:49 ah, well hope it will be cool anyway. 10:05:55 It will be. 10:06:30 Two things: it eliminates a lot of nonsensical hardware requirements that the 65816 required for proper operation. Second, it'll run at 25.175MHz, and third, it'll actually get 25.175MIPS peak performance. 10:06:48 e.g., a simpler CPU results in a 4x performance improvement, AND it's a true 32-bit CPU, not 8/16-bit. 10:07:11 It'll address 64GB of RAM (well, the CPU thinks it's 4.2GB, but remember it has 32-bit wide bytes!). 10:10:39 --- join: Serg (~knoppix@193.201.231.126) joined #forth 10:11:51 hm wait, how do you get to 64? 10:11:56 --- quit: Serg (Client Quit) 10:12:08 2^32 is 4gig, which already involves using ret 10:12:28 4.2 billion memory cells, each of which is 32-bits (e.g., 4 octets) wide. 10:12:37 oh ok 10:12:53 and i was just wondering 10:13:06 say you jump to a 32bit adr using ret 10:13:23 if, at that code, you use jump or jz, where would you end up? 10:13:38 the 28bit addr in that segment? or the absolute addr? 10:14:07 Somewhere int he 26-bit range in that segment. 10:14:22 The way my control flow words work is a bit mind-bending, but I can assure you there is a reason to my madness. 10:14:22 uhm, yes i meant 26 :) 10:14:47 i'm sure there is, but i was just thinking that i have no idea how the p24 handles this 10:14:49 When JUMP executes, it'll occupy, guaranteed, slot 0 (bits 0-5). 10:14:55 yes 10:15:05 Bits 6 through 31, then, contain an effective address for JUMP. 10:15:15 yes 10:15:18 Problem is, as instructions are executed, the I register is shifted to the right, with zeros coming in on the left. 10:15:58 So the address field is *NOT* the physical address it jumps to; rather, it's a bit-mask that is XORed with the P register to determine the target address. 10:16:22 yes, so relative jumps in the segment 10:16:28 This lets the JUMP instruction execute the same way, with the same hardware resources, all the time, every time, regardless of what slot it appears in. 10:16:47 Well, it's not exactly relative, but close. 10:16:55 It doesn't permit position independent code. 10:17:00 yea ok, offset from the segment you're currently in i mean 10:17:05 Right. 10:17:43 i guess the p24 does this the same 10:17:48 (and my emu would screw up ;) 10:17:57 ohwell 10:18:02 I did this because, when reviewing the P21 specifications (not sure how the P24 differs in this area), I noticed that the J instruction (its JUMP opcode) behaved markedly differently depending on what slot it appeared in. In fact, its behavior in slots 1 and 3 were undefined! Iick! 10:18:35 uhm, for the p24, jmp jz jnc and call are restricted to slot 0 10:19:03 Right. See, to me, that's a waste of a perfectly good opcode (e.g., if you use JMP or JZ in slots 1..n, what happens? Is it even documented?). 10:19:37 i have no working p24, but i believe documentation simply states its not allowed 10:19:44 hence it would probably result in some error 10:20:03 JUMP, CALL, JZ and JNC instructions must appear as Slot1 of a program word, ie. bits 23-18. The last 18 bits 17-0 contain the address inside the current 256K word page. They can access code within the current page. To reach other pages of memory, you will have to push a 24-bit address on the return stack and execute the RET instruction. 10:20:21 nothing on what would happen if... 10:20:45 Yeah, precisely my point. 10:20:46 i emailed ting about a p24 btw, i dont think he has any working. he has emulators and models in xilinx and such. 10:20:57 but isnt that the case anyways? 10:21:08 I do not want unspecified behavior in my CPU. Everything must be specified, and to accomplish that, brutal simplification of the internal workings of the CPU is needed. 10:21:09 if you bork up somehow... its kind of your own fault? 10:21:12 This is one way to accomplish this task. 10:21:19 i guess so 10:21:39 you can use jmps like the x86 does, for relative short/near jumps 10:21:51 would make it complicated though, i think 10:21:57 qFox: Actually, MOST control flow in x86 is PC-relative. 10:22:07 i noticed 10:22:21 The only thing that makes it complicated is the need to sign-extend the I contents when shifting. 10:22:56 But this creates a situation where, if the high bit of I is set, then after all instructions are exhausted, it'll contain $FFFFFFFF, and when all instructions are exhausted otherwise, $00000000. 10:23:05 oh, hm, is it possible to add an instruction to the location of the stack pointers? even when you're using rotating stacks 10:23:09 So I have two values of I to look for to initiate an instruction fetch. 10:23:13 which you probably are 10:24:08 With my current scheme, I don't even bother looking for a value: I expressly assigned JUMP opcode value $00, so that its effective address of $0000000, when XORed with P, just causes a straight jump to the next instruction. Slick, eh? 10:24:32 I don't need any new instructions. This is the job of SPR@ and SPR!. 10:24:52 if they can do that, ok :) 10:25:09 That's why it's called SPR@/! -- Special Purpose Register. 10:25:20 Generally speaking, these are registers you don't normally access. 10:25:30 Why would you want the stack pointers anyway? 10:25:33 yeah, i never used it before so... 10:25:38 debug, depth, ... 10:25:48 And in a rotating stack, there are no stack pointers -- the stack is implemented as a series of shift registers. 10:26:11 hmmm, there's no indication as to where T reads its value from? 10:26:21 T is always the top of the stack. 10:26:24 yes but i mean 10:26:30 where the top of the stack is 10:26:40 T is always the top of the stack. :) 10:26:42 Physically. 10:26:44 Electrically. 10:26:45 It's hard-wired. 10:26:51 yes 10:26:51 but 10:26:51 grr 10:26:57 You're making this too complicated. 10:27:13 Imagine a series of registers, A, B, C, etc. 10:27:13 forget it :) 10:27:16 A <-> B <-> C <-> T 10:27:21 yes... 10:27:22 That's how the stack is physically wired in the CPU. 10:27:58 There is no need for a stack pointer, because each element in the stack is hardwired directly to its adjacent neighbors. 10:28:14 When it comes time to push a value, ALL values physically move one cell over. 10:28:38 hm, ok, i guess identification would mean every value would get a identification number. and any stack manipulation would also inc/decrease that number... or something... ahw nevermind 10:28:38 Likewise with a pop, although the P24/P21 does have ONE additional path to make it a circular pop. 10:29:10 Yes, stack manipulation with stack pointers in internal register spaces would definitely be more difficult to implement. 10:29:15 It'd also be slower too. 10:29:24 well imo, a stationary stack, with a pointer for T, would sound faster then a stack where all values are shifted up/down every time. but i'm sure ppl thought about this and this was the best sollution... 10:29:25 (although in an FPGA, it'll probably be plenty fast enough, but...) 10:29:50 The stationary stack is faster because the electrical paths between each element is much, much shorter. 10:29:59 but... 10:30:17 Using a stack pointer to identify T requires address demultiplexors, which introduces about 5 levels of logic date propegation delays. 10:31:03 making things actually slower... oki 10:31:08 What the stationary stack does do, however, is draw more power, because (in a 32 bit * 16 deep stack) all 512 bits are moving at the same time, and that'll suck some power. 10:31:43 so I'm pretty sure my CPU design will get the FPGA it'll be in rather hot. :) 10:32:05 Although, it also depends. 10:32:51 *IF* the FPGA I end up using supports dual-ported RAM as a basic primitive, then having a stack pointer system might actually work, because the logic to implement it is already on the chip. 10:32:52 more power? that doesnt sound right? a stationary stack only mutates when you push a number, and then only the index+1 item is changed... 10:33:00 But I don't think that'll appear in the FPGAs I'm looking to use. 10:33:52 If I load a stack with $AAAA, $5555, $AAAA, $5555, etc. then push another value, then every bit in every cell in the stack will change as soon as I push a number onto the stack. 10:33:58 It has to, to make room for the new number. 10:34:17 nonono, with a stationary stack, i mean... 10:34:25 Oh, we're using the terms differently. 10:34:29 i think so 10:34:32 You're claiming a stationary stack has a stack pointer? 10:34:37 yes :\ 10:34:45 Ooh, OK. I'll use your definition then. 10:34:49 hehe sorry 10:34:55 Sorry, in that case, change what I said to use a "mobile stack" then. :) 10:35:07 heh 10:35:21 i figured stationary, since the data items arent moved with every push/pop :) 10:35:37 yeah, and I figured stationary because T is always in the same spot, electrically. :) 10:35:45 hehe 10:36:31 just out of curiosity, how fast is the cpu, and whats left of that speed netto, that you can use? 10:36:52 netto? 10:36:56 (so after all the system clock, video stuff, and whatever is done) 10:37:20 well, if its 5mhz, do you get the full 5mhz at your disposal? 10:37:25 afaik, you dont... 10:37:26 I'm going to guesstimate that the CPU will run at a blistering speed of 40MHz maximum, but I'm only going to clock it at the VGA dot clock frequency, which is 25.175MHz. 10:37:36 You do and you don't. 10:37:43 Each instruction takes precisely one cycle to execute. 10:37:53 So at 25MHz, you would get 25MIPS *peak*. 10:38:11 yes, but you loose instructions to things like the system clock, dont you 10:38:19 at least, thats what i've been teached... 10:38:32 What eats into it is the fact that it has to fetch instructions. So, assuming a maximally packed instruction word, a single instruction cell will execute in 7 clock cycles, producing 1.16 clocks per instruction. 10:38:41 Huh? 10:38:50 The system clock is what determines execution throughput to begin with. 10:38:58 doesnt your cpu update the system clock every 0.000000...001 second? 10:39:04 No. 10:39:11 well i mean the ... bios clock then? 10:39:18 No. 10:39:19 :) 10:39:21 I won't have that. 10:39:24 what do i.. oh 10:39:26 I have dedicated hardware to keep track of time. 10:39:45 The CPU will have a 64-bit counter which is advanced every clock cycle. 10:39:47 so any timers you might implement on that cpu, will have to be software? 10:40:16 Again, you would have dedicated hardware for that. 10:40:39 If you mean a down-counter that interrupts the CPU when it reaches zero (like the PIT chip in the PCs), then that is external hardware. 10:40:48 k 10:40:52 (though I will probably include ONE inside the CPU to facilitate support for multitasking OSes). 10:41:15 But it'll also have a time-stamp register, whose values just keeps going up and up. 10:42:30 Basically, my plan is this though: produce the core CPU, release it on OpenCores or something, and advocate it as OpenMISC. 10:43:07 Then my particular CPU for the Kestrel will just be a refinement of the OpenMISC. Kind of like how PowerPC and SPARC CPUs are implemented, where they adhere to a well-documented standard, but include refinements above and beyond the basic standards for software compatibility. 10:44:27 the extra register (compared to the p24) will make things considerably easier, i think, for me 10:44:28 :) 10:44:58 Which register? 10:45:08 B 10:45:12 Ahh 10:45:16 p24 only has A 10:45:26 But it can also use R for indexed reading too, right? 10:45:30 P21 supports both A and R. 10:45:33 push/pop 10:45:36 from T 10:45:50 but R is return stack tos 10:45:50 No, I mean, the P21 has an @R+ instruction too. 10:45:56 P24 doesn't have this? 10:45:56 hm p24 doesnt 10:46:00 WOW. 10:46:01 only push/pop 10:46:11 :) 10:46:17 * kc5tja was debating on whether or not I should use B or R for the second pointer. 10:46:22 * kc5tja might still drop B in favor of R. 10:46:27 noooo keep B :p 10:46:31 i said nothing 10:46:35 hehe 10:46:46 I was thinking about it for a while actually, from before you even brought it up. 10:47:19 you can do almost anything with just A, but B would give you some breathing space 10:47:34 Actually, working with graphical data almost requires both A and B. 10:47:39 also, the p24 has no swap instruction, so i swap alot 10:47:40 To get any kind of performance, that is. 10:47:45 Well, vector data of any kind, really. 10:47:52 or i mean, swapping takes 4 instructions, and destrys A 10:48:12 Yes. SWAP si such a basic primitive that I can't fathom how one can live without it. 10:48:20 well, you can, trust me 10:48:21 NIP is there for convenient; I could easily discard it if I need to. 10:48:33 yep 10:48:43 same for OVER, for that matter 10:48:43 Likewise with ROT. 10:49:05 I use SWAP, OVER, NIP, and DROP *very* extensively. I occasionally use ROT too. 10:49:08 SWAP: sta push lda pop 10:49:17 Well, I should say, use it often enough to WANT a dedicated instruction. 10:49:25 OVER: push dup sta pop lda 10:49:29 etc 10:49:33 * kc5tja nods -- it also destroys one element on the R stack too. 10:49:34 yes, true 10:49:39 no it doesnt? 10:49:53 push pop 10:49:57 Where does the 16th element of the R stack go when you execute SWAP? :) 10:50:03 ohhh 10:50:06 ok, true 10:50:30 so you CAN do without :) 10:50:53 Yeah, I know that. But I think it'd make the processor even faster if I continued to have them. 10:51:08 I mean, unlike the P21, I do NOT have custom chip fabs on hand to make a bleedingly fast processor with. :) 10:51:09 yep, well overal performance 10:51:35 Literally, the four-instruction SWAP, with subroutine overhead and all, runs so fast that it takes longer to get the next instruction word than to perform the SWAP. 10:51:50 So Chuck's design requirements are markedly different from mine, where RAM is actually faster than my CPU. 10:52:31 :) 10:53:03 i have 15 register<>register<>memmory instructions now 10:53:30 I'm liking my design. It's not super-minimal, but with only 42 instructions, I think it's quite a reasonable processor. 10:53:43 you could just add the B register as a scratch register you know... 10:54:13 would eliminate 6 instructions from that list 10:54:15 hehe 10:54:43 Huh? 10:55:06 That would eliminate the purpose for having two index registers. 10:55:36 you were talking about throwing that register away alltogether :p 10:56:04 Well, using the R register as the index register. 10:56:18 you mean like CX in x86 10:56:19 ? 10:56:19 So I'd have @R and @R+ 10:56:37 No, I mean in the sense that I'd have, basically, two A registers. :) 10:56:46 hmm 10:56:46 CX is a counter, btw -- index registers are SI and DI. :) 10:56:54 k 10:57:15 well you can do with just one A register 10:57:18 its no big deal 10:57:26 here, to disambiguate, let's use the term "address register" for A, and B. 10:57:40 It is a HUGE deal when working with source and destination vectors. 10:58:06 i suppose so :) 10:58:17 but even then its still managable i think 10:58:19 I need the ability to read from two vectors, do some operation, and write to a third vector. 10:58:31 It's hellaciously slow. 10:58:35 :) 10:58:40 'cos you're constantly swapping the value of A in and out. 10:58:45 yep 10:58:55 Hmm...maybe I ought to add two more instructions: 10:59:12 !A, !A+, @A, @A+, @B, @B+, !R, !R+ 10:59:32 That is, A is a read/write vector pointer, B is read-only, and R is write-only. 10:59:42 That'd allow a nice, 2-source-1-destination operation. 10:59:53 anyways, 15 instructions for mem/regs. aldp,ald,astp,ast,sta,lda (same set for B), and ldi,pop,push 11:00:23 Yep. That's about right. 11:00:33 In P21, memory access is about half of the CPU's instructions too. 11:00:55 then, the p24 has no OR instruction 11:00:55 I currently ahve 15 instructions for load/store too. 11:00:59 --- join: chandler (~chandler@64-145-60-36.client.dsl.net) joined #forth 11:01:05 Yep. OR can be emulated with AND and XOR. 11:01:10 you're supposed to either emulate it with com and xor 11:01:15 oh was it and 11:01:25 But, again, I prefer to have OR lying around because I use it often enough that it's useful to have it. 11:01:38 but it was advised that you ditch another instructions to add OR instead... 11:01:46 exactly :) 11:02:28 There, I now have 44 instructions. :) 11:03:41 That's still lass than half of the 6502's instruction set count, and less than 25% of the 65816's. 11:04:24 9 arithmetic instructions, excluding the excessive shifts (and rots), add com and div mul xor or 11:04:25 man I can't type today. :( 11:04:29 shr shl 11:04:54 I have these: AND, OR, XOR, COM, 2*, 2/, SL, SR, RL, and RR. 11:05:04 So a total of 10 logical instructions. 11:05:16 Oh, you're including arithmetic too. 11:05:17 what about add? 11:05:29 + - *+ /- (not sure about this one yet) and NEG 11:05:32 yar all the same big pile to me :p 11:05:41 neg can be emulated 11:05:53 relatively slow, i agree, but its possible 11:06:10 lets see i had that listed somewhere 11:06:22 yeah, and that (and COM) are both on the list to be removed if necessary. 11:06:31 yep com can be too 11:07:13 com is just easy to get -1, faster then ldi 11:07:23 hm, you'll know this 11:07:37 cheap gas prices near you... http://news.yahoo.com/news?tmpl=story&u=/nm/20040509/us_nm/energy_gasoline_internet_dc_2 11:07:39 is executing 4 instructions actually faster then loading a literal on the stack? 11:07:56 (4 inst for -1, dup dup xor com, to 5 slots for ldi) 11:08:19 For MY CPU, no. A literal is faster. 11:08:41 For Chuck's CPU, yes, because his CPU can execute all four instructions and STILL have to wait for memory to deliver the next word. 11:09:02 hm, nice and confusing :) 11:09:12 That's the beauty of asynchronous logic. 11:09:14 so its really cpu specific then 11:09:22 * kc5tja has definite plans to explore async logic with my MISC. >:) 11:09:28 Yes, as all optimizations are. 11:09:47 yea ok 11:10:23 rot just rotates the top 3 of the stack, right? 11:10:52 p24 didnt have any, you could only access the top 2 items directly, anything else would mean quite some work 11:11:47 SDO: Hehe -- too bad gas prices down hear are approaching $3/gallon. 11:12:02 kc5tja, yep. 11:12:10 Yes, ROT is ( a b c -- b c a ) 11:12:20 I called it about 8-9 months ago, said gas would be 3+ bucks before end of 2004, and 5-6 bucks a gallon before end of 2006 11:12:22 Basically >R SWAP R> SWAP :) 11:12:40 btw, if you include NEG, then get rid of - 11:12:59 I use - too much to lose it. 11:13:35 I would actually probably get rid of - before I got rid of NEG. 11:13:38 Since NEG + is -. 11:13:48 aye :) 11:15:06 Oooh...geez. 11:15:10 I'm sorry, I just said what you suggested. 11:15:14 Man, I'm out of it today. 11:15:15 :( 11:15:36 ok, then i'm at 13 for arithmetic. add com and div mul xor or shl shr rl rr neg sub 11:16:51 What 2 instructions did you dispose of? I still have 15. 11:17:01 Was it 2* and 2/? 11:17:26 hmmm no the sl/sr 11:17:35 my shr just does it once. 11:17:40 sorry 11:17:46 same for rr/rl 11:18:39 hm 11:18:52 actually rr and rl should go under stack manipulation, come to think about it 11:20:59 and, could just be done with ROT, rather then having two instructions. either RL or RR can be done by two ROTs, the other with one... 11:24:03 and dup can be emulated with OVER ROT ;) 11:25:05 hm, no, it cannot. heh oops 11:26:19 i'm at 37 instructions now total. 11:27:12 4 jumps, 15 regs<>mem, 11 arithmetic, 6 stack manipulation, and NOP 11:27:44 5 for jumps. 11:29:14 jump, ret, jz, jc, call. aldp bldp ald bld astp bstp ast bst sta stb lda ldb pop push ldi. add com and div mul xor or shl shr neg sub. dup over drop swap nip rot. nop 11:29:27 --- quit: chandler (Client Quit) 11:29:34 where imo, nip and rot are disputable. 11:30:13 hm and pop and push should go with stack manipulation i guess. 11:31:25 --- join: Sonarman (~matt@adsl-63-196-0-63.dsl.snfc21.pacbell.net) joined #forth 11:31:47 36 instructions :\ 11:32:14 uhm, whatever, what i just listed. 11:32:54 and you can add most used instructions for graphical programming, since there's alot of space for that when using 6 bit instructions... 11:33:30 like the shifts and rots, etc. 11:37:23 sorry -- had to help out my roommate a bit. 11:37:26 Loading gear into his truck. 11:38:10 :) 11:38:13 RR and RL rotate bits, not stack items. 11:38:17 huh 11:38:43 hmmm you mean no padding like shl/shr? 11:38:51 Yeah, no padding. 11:38:55 ahhh ok 11:39:01 But I'm kind of thinking... 11:39:02 i can live with that :) 11:39:09 p24 only had shr/shl 11:39:09 Rotate Left, but SHIFT right. 11:39:14 But I'm not too sure. 11:39:18 Well, you can get by with just shifts. 11:39:28 You can emulate a rotate with two shifts and an OR. 11:39:48 So RR and RL will probably go away too. 11:40:40 then i'm at the list above... i counted 38 11:41:17 --- quit: I440r ("brb") 11:42:36 but that includes the, for me, odd instructions i dont remember 11:42:53 Just a second -- writing this down in my log book. 11:45:53 btw, have you considered using 5 bit instructions instead? you would loose the extra instructions you mentioned, but might the 6 instructions per word not make up for that possible loss of speed? i dont know how hard it is to do this internally... 11:48:24 hmmm then again, i guess overall you'd save more time with the additional instructions 11:49:11 Well, at 5 bits per instruction, it is possible, but I'd lose any possibility of future expansion or application-specific instructions. 11:49:33 See, I still prefer having @R and @R+ too. 11:49:42 So that brings us back to 41 instructions again. :) 11:50:55 heh, yes 11:51:25 Otherwise, I think this is a perfectly workable design. 11:51:28 well, there's about 25 instructions to devide under "redundant" instructions 11:52:27 ? 11:52:42 I can see a few, but certainly not 25. 11:52:42 :) 11:53:13 well, am i missing something? 11:53:16 6 bits 11:53:30 w 26 11:53:41 I thought you were talking about of the instructions already defined. 11:53:47 no 11:53:55 25 to be defined... 11:54:07 in redundant instructions (so instructions we "could" do without) 11:54:08 mur: Instructions are packed 6 wide in a single memory word. 11:54:24 isnt it 5? 5*6+2 = 32 11:54:35 Yeah, the last 2 bits are part of the 6th instruction. 11:54:39 ah, ok :) 11:56:27 cant you add the same memmory instruction set for T? 11:56:42 I would claim that all the B-related instructions should be considered "extras" too; so that only A and R are the built-in memory pointer registers in the most basic, stripped down instruction set. 11:56:43 that way you wont have to move the TOS to A B (or R) 11:57:09 for me, the R set are too then ;) 11:57:23 qFox: No, because the data path for T collides between supplying the address, and depositing the data. 11:57:30 oh ok, pity 11:59:14 and the byte sized memmory instructions were a no go because? 11:59:51 Because: 11:59:59 1) I would need logic to implement byte lane selection, 12:00:11 2) I would need logic to implement sign extension of character or half-word data, 12:00:28 3) I would need logic to implement detection of unaligned data writes or reads to memory, 12:00:49 4) I would need to handle illegal program address detection (opcodes, being 32-bits, must be aligned to 32-bit boundaries) 12:01:09 That alone is worth making the decision to adopt a consistent cell size. 12:01:10 right... ohwell :) 12:01:40 And besides, just think of how utterly friendly this CPU is to handling Unicode data. 12:01:51 hehe 12:01:53 The argument that "Unicode takes too much space" is no longer valid. 12:02:00 you know 12:02:16 i'll be very content with myself if i EVER bother with unicode ;) 12:03:13 Heh 12:04:06 Well, the nice thing about having a 32-bit byte size is, frankly, the whole war over which character encoding to use becomes moot. And with 4.2 giga-whatever-you-wanna-call-ems addressing space, WHO CARES about memory efficiency? 12:04:31 I mean, if you want to pack and unpack text in memory, go right on ahead. As long as you *process* the data in native cell sizes, it'll be just as fast as any other CPU handling data. 12:04:55 This CPU can pack/unpack text while handling I/O over a network or to harddrive, for example -- the cost of packing would be entirely dwarfed by the cost of doing the I/O. 12:08:25 is there a reason why one would write something like (x+l) MOD l instead of x MOD l? 12:08:50 Yes -- it performs a round-up operation. 12:09:10 Oh, wait, that's MOD.... 12:09:12 * kc5tja thinks. 12:09:15 * kc5tja was thinking division. 12:09:20 btw that's an L not a ONE 12:09:36 what does L do 12:09:42 Yes, I know. 12:09:42 L is just a constant 12:10:04 Well, (x+l) mod l will just return x. 12:10:21 not if x>l :) 12:11:12 but won't the results of (x+l) MOD l and x MOD l be the same? 12:11:51 that's what's bothering me; i can't see the reason why the person did the +l 12:12:22 Can you guarantee that x > l for all time? 12:13:23 i don't know, but why would it matter whether x > l or not? 12:14:16 the only reason i could see for the +l is that if -l < x < 0, to make x positive in the range of 0 -> l, but i don't think x would ever be negative 12:16:06 anyway, maybe the guy just wasn't thinking clearly when he wrote that in his code :) 12:16:30 I have no idae. 12:16:31 idea. 12:16:46 Perhaps it is a form of ABS() as you say, one which doesn't involve branches to disrupt the pipeline. 12:16:58 Now MOD still does a division -- it's just the remainder of the division. 12:17:09 so (x+l)/l == (x/l)+1 12:17:22 I wonder how that affects the remainder. 12:17:55 nope, it's not a form of ABS, it's just a bounds check for a DOES> word 12:18:28 Huh? 12:18:30 Weird. 12:18:32 I have no idea. 12:18:59 :) 12:19:54 Now wait a minute, if x is negative and constrained by -l < x < 0, then it would function like ABS. 12:20:20 yeah 12:20:43 Oh, but it won't be ABS -- but it would "shift" it into the positive realm, because of the + 1. 12:21:33 hrm? what + 1? 12:21:46 (X+L)/L == (X/L)+1 12:22:14 So if X is constrained as above, the +L makes it positive. 12:22:32 The larger the magnitude of X, the smaller the positive integer. 12:22:45 Divide by L, and you get a smaller (positive) remainder. 12:23:07 But, of course, this assumes that X is negative. 12:23:15 oh, right. but this is a MOD we've got here 12:23:34 Right; MOD is the remainder of a division. 12:24:06 yes. i think it was just late at night when he did "Homes + Homes MOD" 12:25:00 I would have to see the context of it all, I guess. 12:25:07 : World 12:25:47 : World CREATE ( -- ) Homes CHARS ALLOT DOES> SWAP Homes + Homes MOD CHARS + ; 12:26:02 Well, it turns out that, if one were to custom fabricate my OpenMISC architecture that qfox and I hashed out, it likely would compete rather admirably with a DEC Alpha CPU! 12:26:38 I don't know what Homes is. What is it used for? 12:26:59 it's just a constant: the number of character locations on the screen 12:27:29 DOES> ( u -- c-addr ) 12:28:17 seemingly no point in the "Homes +" 12:28:21 Yeah, as far as I can tell, Homes MOD CHARS + is its equivalent. 12:28:35 hm, does> isnt very hard, is it? 12:28:36 * tathi agrees too... :) 12:29:12 now that i did my first implementation start... a variable is already a piece of code, how hard is it to alter this code to execute additional words? 12:31:08 qFox: That depends on how your Forth is implemented. 12:31:26 --- join: Serg (~knoppix@193.201.231.126) joined #forth 12:31:27 hm, ok 13:04:06 --- quit: Serg ("Leaving") 13:19:08 qFox: OK, I removed the B-related instructions, and left @R and @R+ in, plus SPR@ and SPR! -- that gives me 38 instructions. 13:19:25 That also includes the multi-bit shift instructions, but NOT the rotate instructions. 13:19:27 so 13:19:28 no 13:19:30 B reg? 13:19:31 :( 13:19:38 You can use the R register for that. 13:19:46 but i liked the B reg 13:19:52 i already bonded with it :\ 13:20:22 Well, this is for the minimal core instruction set. 13:20:27 but but but 13:21:08 ? 13:21:10 you're crossing the 32 number anyhow, a B reg can possibly speed things up, whats 8 instructions to that? :) plus the space for B i guess 13:22:13 Would you be happy if B only had write capability? 13:22:17 Since R already has read capability? 13:22:23 A is both read/write. 13:22:37 if B has write, then why would it not get read i wonder? 13:23:45 you already loose like 2 or 6 instructions to sta/lda, and sta/stp (or did you mean by writing, only sta/lda?) 13:23:46 Then we can extend that to R as well; A, B, and R, all read/write. 13:24:17 I meant ast, astp, bst, bstp, rst, rstp. 13:24:37 With a fully functional A, B, and R address pointer, I now have 44 instructions. 13:24:38 you need stb/ldb for it too. 13:24:53 True. 13:24:56 Make that 46. 13:25:10 so if you've gone that far, you might as well add bld and bldp if you ask me 13:25:31 I just said, "with a fully functional A, B, and R address pointer," 13:25:48 A, B, and R all have x!, x@, @x, @x+, !x, and !x+ forms. 13:25:48 oh ok 13:26:10 Well, OK, scratch that -- there is no R! -- push does that task. 13:26:16 And no R@ -- pop does that. 13:26:19 R@ == pop dup push 13:26:23 true! 13:26:56 Well, it's not exactly MISC anymore, is it? 13:27:09 well... ok, lets say you get rid of B entirely, how much space would you save and what would you put in in return? 13:27:20 no, but you have the instructions to spare 13:27:47 you could also just put them for RES ;) 13:28:06 RES? 13:29:09 reserved :p 13:29:26 but i'd say just fill 'er up 13:29:44 Well, the idea was to make a minimal processor core, that people can add instructions to for their own needs if desired, while still leaving some room for future expansion for ME. :) 13:29:57 haha 13:30:54 well... suit yourself really. but technically, A is sufficient as far as address register goes 13:31:35 if you're going for a real misc approach i mean 13:32:33 @R @R+ !R !R+ make things a bit easier, where the register is there anyhow. SUB NEG NIP ROT etc, can be done without, but do increase overall performance of programs 13:32:34 I'll just call it a ZISC processor -- zero-operand instruction set computer. :) 13:32:57 then you should let the jump instructions take their target from the stack too ;) 13:33:32 and ldi 13:33:36 :) 13:33:41 ldi is true zero-operand. 13:34:09 branching instructions are special for performance reasons. 13:34:13 (and code compactness reasons) 13:34:18 in the p24, ldi takes the argument from P 13:34:23 not from T 13:34:37 When 99% of your code is going to consist of CALL instructions, they darn well better be pretty compact. :) 13:34:44 hehehe true 13:35:03 Well, by that logic, then @A..et al.. are also non-zero-operand instructions. 13:35:09 i'm just being precise, thats all 13:35:23 hm, ok got a point there 13:36:47 I should start writing the Verilog sources for this microprocessor. 13:37:00 well. my personal preference would say, screw *isc, and just implement the B set 13:37:19 It's ZISC, darn it! 13:37:28 make it FISC 13:37:33 Just a smidgen more complex than a MISC. 13:37:35 FISC1 13:37:37 :P 13:37:52 since the next cpu will be improved, no doubt 13:38:20 Yes. By quite a bit. 13:38:26 The first is just a raw, plain-vanilla CPU. 13:38:36 No MMU, and a flat address space. 13:38:44 :) 13:38:59 Later generations of the processor will add these features, along perhaps with instruction parallelism in the form of "macro-instructions." 13:39:25 E.g., commonly occuring sequences like POP DUP PUSH are recognized as an aggregate, and executed in a single cycle. 13:39:41 nice 13:40:07 Oh, and let's not forget the future of asynchronous logic too -- that will bring about a fair amount of execution performance, I'm sure. 13:41:53 anyways, create the cpu with the misc set, then see how much space there is left, and add these features untill there's no more space, or something? 13:43:10 I don't have the facility to do that yet. I can only create a simulation and verify design correctness; I can't synthesize logic and place in specific chips. 13:43:27 I need to purchase a programmer and synthesis tool for that, and I can't afford to do that just yet. 13:43:33 Maybe in a month or two... 13:43:43 OR... 13:43:51 hm but wont your designsoftware give a spacial estimate? 13:43:53 boombox has an FPGA programming environment set up. 13:43:56 yep 13:44:09 he was buying some gear from ebay, i wonder if he got it, i believe it ran out 13:44:11 I can make the MISC verilog source, and e-mail it to him. He can give feedback on its synthesis. 13:45:26 I'm going to add SYS in the instruction set again too. 13:45:32 hehe 13:45:51 That lets a system call occur from anywhere in memory, without having to do a long jump sequence. 13:45:58 but sys only checks a certain memmory area? 13:45:58 ohh 13:46:01 ok 13:46:12 SYS is equivalent to CALLing location $00000010. 13:46:41 OTOH, it ought to be fairly easy to implement something like it this way too: 13:46:49 : SYS $10 >R ; 13:47:42 would sound like a waste of instructionspace yes 13:47:50 That would have a 6 cycle penalty for invoking the system call (two for the first subroutine invokation, 1 for pushing the literal, 1 for executing >R [push], one for the RET, then one more for the system call handler's RET) 13:49:18 then again, this would mean you can add a different instruction, that could save a whole lot of time in the long run... 13:50:12 boombox won his auction 13:50:17 Well, I figure that something like ldi / push / ret could be a macro-instruction, and could all be done in a single clock too. 13:50:32 But that is if it *really* needs it. 13:50:36 I really don't think it does. 13:51:28 hm, in matter of speed, which instructions are faster then others? 13:51:45 For my CPU? 13:51:47 yes 13:51:49 They all run the same speed. 13:52:05 Or, at least, they SHOULD. 13:52:23 so either you push, sta, nop, its all the same? 13:52:42 The adder circuit might need to be hand-coded at the gate-level to be a ripple-carry-adder (instead of one using a full-blown carry look-ahead generator), which would make them and other instructions using the adder slower. 13:52:49 Yep. 13:58:54 Actually, I might stand corrected; I'm not sure yet. But I think the multi-bit shift instructions might take a cycle or two for the data to propegate through. 13:59:07 We'll see how it goes. 13:59:25 --- join: BoomBoX (BoomBoX@cd5114606.cable.wanadoo.nl) joined #forth 13:59:26 yea, but if you take my already slow emulator 13:59:33 wow first connect works 13:59:39 i can tell for sure that a push/pop, is much slower then a nop 13:59:39 hi all 13:59:54 qFox: Your emulator isn't a simulator; it doesn't simulate the actual functioning of the hardware. 14:00:00 BoomBoX: Howdy 14:00:09 true 14:00:15 hi kc5tja, heard there where some changes in the design? 14:00:24 Just a little. :D 14:00:32 The 65816 is no longer the CPU of choice. 14:00:40 yeah an MISC and such, please give me an verbose update :) 14:00:50 While it's a great CPU, it was just becoming a bit of a burden to work with. 14:01:15 The single biggest problem I have with it is that it runs at 5V, while the rest of the circuitry on the board will run at 3.3V. 14:01:16 ah i see. so what will be the main processing core now? 14:01:18 (because of the FPGAs) 14:01:30 well most FPGA's are 5V tolerant 14:01:35 depends on what parts you use 14:01:42 The second biggest problem is its wonky memory management requirements to support 6502 systems. 14:01:57 hmmm... 14:02:00 i see 14:02:13 For example, when it boots up, ROM must appear at $00FFFC. 14:02:31 This creates a bizarre situation, where you have memory alternating between RAM and ROM every 64K. 14:02:40 (I/O mapping notwithstanding) 14:02:43 not very continguous 14:02:48 yes i see 14:03:10 Well, if you treat the ROM as a rom-disk, and load everything into RAM anyway (because ROM is such a slow-poke, even at 12MHz), then it's not that big an issue, for the software. 14:03:44 But then you need circuitry to enable/disable the ROM (which I'm going to continue to have anyway, obviously for speed reasons), you need to deal with explaining how the address mapping of the ROMs works, etc. 14:03:49 It just gets to be a burden. 14:03:51 Workable, but not optimal. 14:04:19 i see, 14:04:26 Also, madgarden expressed concerns relating to its speed, overall. And this raises two issues: clock speed, and bus width. 14:04:59 With so many things today being 32-bit, using a 16-bit CPU would introduce unnecessary speed-bumps in the system. 14:05:11 At least when interfacing via TCP/IP, or reading image files, etc. 14:05:13 indeed 14:05:30 yes too much overhead, and trying to stitch 16 bit words together 14:05:40 Then there's the fact that the 6502/65816 take a minimum of two clock cycles to do anything at all; hence, peak performance is, at best, one half its clock speed in MIPS. 14:06:10 then you get the translation overhead 14:06:18 and speed decreases further 14:06:42 What ultimatley killed it, though, was that the Verilog model of the 6502 I downloaded did NOT follow the official timing diagrams for the 6502. 14:07:20 And that means I couldn't logically design the FTS1002 K-Bus bridge chip without hand-writing a fake 6502 in Verilog to specifically match the bus timings. 14:07:28 And if I was going to do that, I might as well make my own CPU. 14:07:28 :) 14:07:35 One that natively supported K-Bus as its local bus to start with. 14:07:37 hehe :) 14:07:50 so this processor is going to be an native forth processor? 14:08:08 hence, Kestrel will basically subsume the role of Raven -- a MISC processor at its core, and with better graphics on the screen. CPU is clocked at 25.175MHz. 14:08:30 The CPU will offer a 32-bit address space. BUT EACH BYTE IS 32-BITS WIDE. Hence, to a PC, it addresses 64GB. 14:08:36 err, sorry, 32GB. 14:09:03 isnt 4 multiplied by 4 16? 14:09:10 16gb? 14:09:14 * qFox smiles 14:09:15 Gahh, sorry, yes, 16GB. 14:09:24 I've been out of it all day. 14:09:40 dont worry, i had to study for the classes operating systems all day 14:09:46 so its all fresh in memory :P 14:10:12 I've been told by a few others that I've described this to that this is how the DEC Alpha CPU handled memory too. 14:10:56 Anyway, to make a long story short, qFox and I have finally agreed on an instruction set for it. :) 14:11:03 hehe :) 14:11:18 and I'll be working on its peripheral interface -- it's bus interface, being based on Wishbone, is going to be trivial. Utterly. 14:11:55 dont know nothing about wishbone but i will read it up on open cores, what device are you going to use to house the processor in? 14:12:02 No idea. 14:12:06 I've no experience with that. 14:12:29 I was going to write the Verilog for the CPU, and simulate it here. 14:12:36 well me neither too much, my first 8 bit processor is already to big for anything i have 14:12:50 Then I realized that you had programmable logic experience, and that you might be able to give feedback on its synthesizability. 14:13:06 yeah no problem, but please understand i am just learning verilog 14:13:22 What system are you using for your FPGA work? 14:13:34 this programmable logic thing is just a personal research thing, i have now built my first processor 14:13:48 well, soon my first FPGA will arrive, i have now used mosly CPLD's 14:13:57 Ahh 14:14:01 becouse of their price, but i have won an XilinX virtex part on ebay 14:14:22 * kc5tja was thinking of going with some Spartan parts for the Kestrel. 14:14:23 it will arrive shortly, it has about 6192 logic elements and 40kbits of ram 14:14:37 i heard the new spartan 3's where quite cheap 14:14:53 Yeah, but let's just say, they are "3.3V tolerant." :D 14:14:55 i bought this virtex becouse it was cheap and BGA 14:15:04 They really want to be run at 2.5V and 1.5V, IIRC. 14:15:05 ouch, too bad 14:15:16 --- quit: warpzero (Remote closed the connection) 14:15:32 yeah i know, LVCMOS or something else with an weird acronym 14:16:02 Though, I am not sure the free programmer can program the S3s. But I'm fairly confident that I can program a S2 chip. 14:16:19 I was thinking of using a Spartan 2 of some kind. 14:16:25 if the s3 supports JTAG the free programmer supports it 14:16:31 Nope. 14:16:48 The free programmer can talk JTAG, but the bit-stream used to program the chip might be totally different. 14:17:13 yes, but if you want your design to be non volatile you can attach the serial flash to it, and program that with JTAG too 14:17:27 the flash has all the specific data on how to clock the data in the spartan 3 14:17:41 Non sequitor -- if the free programmer won't talk to a Spartan 3, it won't talk to a serial EEPROM that talks to a Spartan 3 either. :) 14:17:58 ah that sucks a lot 14:18:01 (well, it will probably talk to it, but it'll just load garbage into the chip) 14:18:31 seems so weird, but you can program an spartan via JTAG too? 14:18:44 they could not be incompatible with that too? 14:18:44 Yes, but it's volatile. 14:19:12 well the only thing you load in the flash is the bitstream, and they have all the specific information about clocking and such 14:19:17 JTAG does not specify any standards for the *contents* of data payloads, any more than Ethernet says what should appear in an HTTP packet. 14:19:21 as i could read in the application notes of xilinx 14:19:55 yes, but the instructions for programming are the same, what positions and what data is all made by the program file generator that you use 14:19:56 --- part: gl left #forth 14:19:56 --- join: gl (~foo@int.0x80.org) joined #forth 14:20:16 --- join: lalalim_ (identsucks@p508AA316.dip.t-dialin.net) joined #forth 14:20:34 Then how come the programmer will refuse to talk to certain devices? 14:20:52 Besides profit motive, of course. 14:20:56 maybe becouse of voltage requirements, the programmer works only on 5, 3.3 and 2.5v parts 14:21:16 as the 74HC125 gates wont work at an lower voltage 14:21:20 or at least not correctly 14:21:34 That's the job of the chip's programming hardware to figure out. 14:21:38 I'm talking about the *software* 14:21:49 The software won't touch certain members of the Spartan 2 family. 14:22:12 And you must, absolutely, positively must, select which chip you are programming for for it to generate the correct bit-stream. 14:22:21 ah but thats becouse that some parts cant be synthesised with the free version of ISE 14:22:29 In some chips, an output enable might appear in bit 2 of a packet, but in other chips, that same signal might appear in bit 4. 14:23:13 Well, thank you for finally coming to see what I've been trying to convey all this time. :) 14:23:19 hmm, i dont know about those specifics. 14:23:38 yeah i was thinking about the hardware, as in programmer. i think the thingy that goes on the LPT port 14:23:41 but you mean the software 14:23:47 sorry for that, its evening here 14:23:54 The software and the bit-stream it generates. 14:24:36 If you read the data sheets for the parts, they'll give you a *rough* breakdown of the framing structure used to program the chips with. And every chip has a different, though similar, structure. Bits get shifted around, some bits go here in chip type A, but there in type B, etc. 14:25:03 yeah, so its difficult to make an good programming software 14:25:14 Exactly. 14:25:24 Well........ 14:25:27 I disagree. 14:25:27 --- quit: lalalim (Read error: 60 (Operation timed out)) 14:25:31 well the programming software from xilinx, will recognise all parts. but the free synthesiser will not place and route 14:25:35 I think it's possible to make a good programming programmer. 14:25:50 But you just have to be aware that each chip is mutually incompatible with each other. 14:26:15 Anyway, this is *entirely* academic for me at the moment. 14:26:30 My immediate goal is to make that CPU. 14:26:36 usually the same family is compatible 14:27:20 but the programming isnt the problem i think, the software is going to be the most pressing matter, unless you want to know how to write bitstreams by hand? 14:27:42 i mean synthesis software 14:27:51 The bus interface is basically going to consist of address bus, data bus, clock input, reset, NMI, IRQ, and a small handful of bus synchronization signals. 14:28:48 Hopefully, if I'm lucky, I'll have enough space for a full 32-bit address and 32-bit data bus. 14:29:19 but then the processor... hey i am terrible sorry kc5tja but i have to go and start studying 14:29:24 still have some 300 pages to study 14:29:38 Finish your first sentence at least? :) 14:30:27 Oh well. 14:30:30 no didnt have an scentence ready, was just thinking about how much space the interface would take. but i cant do that estimate accurately not with the software/hardware i have here 14:31:27 yeah; I am very willing to sacrifice upper address bits (or multiplex address bits on top of each other) if necessary. 14:31:33 (e.g., A0/A16, A1/A17, etc) 14:32:02 hmm bad idea, as you would need extra switching logic, if an device is chosen with enough pins you can avoid that 14:32:23 That is why I said, "If necessary." :) 14:32:48 well multiplexing eats a lot of routing resources 14:32:57 but if needed :) 14:33:05 well really gotta go, 14:33:09 good night you all 14:33:15 okies 14:33:22 Don't be a stranger. 14:33:29 ??? 14:33:33 what do you mean? 14:33:34 E.g., visit more often. 14:33:47 yeah, well the whole IRC medium i am not that familiar with :P 14:33:54 but i will try, when i find some time :) 14:33:58 Hehe :D 14:33:59 anyways, bye all 14:34:09 --- quit: BoomBoX () 14:46:39 --- quit: tathi ("leaving") 14:48:44 --- join: warpzero (~warpzero@dsl.142.mt.onewest.net) joined #forth 15:03:55 --- join: TheBlueWizard (TheBlueWiz@207.111.96.51) joined #forth 15:03:56 --- mode: ChanServ set +o TheBlueWizard 15:04:07 hiya all....big crowd tonight! 15:06:35 Hey TheBlueWizard :) 15:06:45 hiya Robert 15:08:16 --- quit: fridge ("Leaving") 15:18:34 re TheBlueWizard 15:19:26 TheBlueWizard: A big change occured to the Kestrel design last night -- gone is the 65816 as the central CPU; in its place will be a nice, new, shining MISC CPU! 15:24:58 hiya kc5tja 15:25:13 * TheBlueWizard blinks! 15:25:57 what made you decide to change it completely? and how would you go at it? 15:28:44 It was just a series of issues that kept piling up on top of one another. 15:28:48 The 65816 is a great CPU. 15:29:42 But it's boot-time requirements place a burden on the hardware: the fact that it draws its boot-time vector at location $00FFFC (versus $FFFFFC, like any sane person would have it!) makes for some . . . "interesting" . . . address decoding logic, to say the least. 15:29:58 is i440r on crack normally or am i just doing something wrong with isforth? seems to only take numbers in base 5, ie 3 3 + == 11 and it doesn't take 5-9 as valid inputs of course it could just be that i know so little about forth that i'm just doing something majorly wrong haha 15:30:16 hmm....I take it that 65816, while a great CPU in your book, just doesn't mesh with the architecture you are having? 15:30:37 thelsdj: I think he's doing something wonky with isforth. In a sane Forth, that wouldn't happen. :) 15:30:48 hah 15:31:31 TheBlueWizard: The other issues involved include bus bandwidth too. The chip is fundamentally restricted from running above 14MHz, so that creates some problems. Plus, it's a byte-wide bus. 15:32:05 Combine that with the fact that the CPU is only a 16-bit CPU, and has awkward addressing modes, and that the fastest operation on the chip still takes two clock cycles, and it's easy to see that, compared to a MISC, the 65816 would be slow as molasses. 15:32:14 Now...that's not what prompted the change though. 15:32:17 I thought 65816 has a 16 bit data bus...I could be wrong 8-P 15:32:19 These are all just contributing factors. 15:32:25 Nope -- 8-bit only. 15:32:37 And yes, it IS performance competitive with the full-fledged, 16-bit wide 68000 chip! 15:32:40 hmm...ok 15:32:41 hmm well 'decimal 9 9 + .' displays 18 but jeez default base 5? 15:32:49 hah 15:32:55 thelsdj: Why does it default to base 5? 15:33:32 i'm lookin in the code to see 15:33:36 TheBlueWizard: The final straw that broke the camel's back was this: I downloaded the ONLY 6502 Verilog model I could find, which I then hacked to emulate the 65816's bus interface (e.g., multiplexing the bank address byte on the data bus). 15:34:23 TheBlueWizard: It turns out, the Verilog model DOES NOT implement the proper 6502 timing signals!! It might be fine for use inside an FPGA, but is patently false for anything I'm trying to use it for. 15:34:53 To get around it, I'd need to write my own fake CPU, which caused me to figure, "OK, screw it, if I have to do that to design the bus interface chip anyway, I'll just make a whole CPU that *already has* the proper bus interface to start with." 15:36:14 So, there you have it. :) 15:36:21 qFox and I finished working on the instruction set. 15:36:35 It's not nearly as MISC as Chuck's chips. 47 instructions. :) 15:36:46 But, it's MISC in spirit and implementation. 15:36:58 hmm....so the Verilog 6502 model is b0rked to start with :-P 15:36:58 Moreover, the attributes of the processor are as follows: 15:37:21 It addresses 4.2 billion (32-bit address space) bytes of data. Sounds normal so far, until you realize, a byte is 32-bits wide on this CPU. :) 15:37:58 It supports one external maskable interrupt, and one non-maskable interrupt. 15:38:27 Instructions are 6-bits wide, packed 6-wide in a single word of memory (5 full opcodes, plus the least significant 2 bits of the 6th). 15:38:27 oooooh there we go, it has to do with it not correctly detecting my TERM=screen if i export TERM=Eterm or something it gets base 10, thats very weird 15:38:37 um...so you're saying that it does not distinguish the data width? E.g. only one data type...a 32-bit "byte"? 15:38:56 TheBlueWizard: Right. 15:39:37 There is prior art to suggest that this isn't a necessarily bad design decision. 15:39:38 mmhmm...simple design overall 15:39:51 The TMS9900 did the same thing, and had special instructions for accessing bytes in memory. 15:40:04 And of course, there is the world's fastest RISC processor, the DEC Alpha. :) 15:40:08 And then the F21, etc. 15:40:23 It eliminates a whole *slew* of problems. 15:40:57 Data misalignment: do we add hardware to generate a data alignment fault, or do we just break the read/write operation into multiple, smaller read/write operations to handle it? 15:41:05 of course those CPUs have some rather fancy (as fancy as they go for their architectures) byte manipulation instructions 15:41:08 Instruction misalignment: same thing -- fault, or break it apart? 15:41:09 etc. 15:41:25 Right. 15:41:45 In my case, I have 2* and 2/, to do single-bit shifting, *BUT*, I also have SL and SR, to do multi-bit shifts as well. 15:41:55 I suspect yours would be rather minimal regarding byte manipulations 15:42:13 As experience with the architecture grows, I may add additional instructions to deal with byte-packing, but really, it's not that big a deal, I think. 15:42:27 * TheBlueWizard nods 15:43:01 Byte packing and unpacking can happen while I/O is being performed; when in memory, individual bytes can be sprawled out in memory like in any other architecture; it's just that I have 32-bit bytes, while most other CPUs have 8-bit bytes. :D 15:43:06 of course string processing *is* a big deal, so....have to do some evaluation using an emulator 15:43:12 Yep. 15:43:27 But let's not forget, either -- Unicode is now set up for 32-bit characters. 15:43:47 and don-t forget UTF-8 too :) 15:44:15 Yeah, but I challenge you to write efficient text manipulation code for UTF-8. Everyone I've seen converts to UTF-16 or UTF-32 first, works on the data, then converts back. Iicky. 15:45:12 heh 15:45:37 * TheBlueWizard hasn't worked with UTF-8 stuff directly, sdo he can't say 15:46:06 I worked with it once to implement GCOM (my open source, in-process only implementation of Microsoft's COM). 15:46:12 It wasn't pretty. :D 15:46:40 And all I was using it for was to look up filenames and whatnot -- I *shiver* at the thought of using UTF-8 to enocde and directly manipulate text-files. :( 15:48:04 Anyway, there are other simplifications too. 15:48:12 of course one doesn't have to slavishly follow UTF-8 format...IIRC Java uses its own version of UTF-8 15:48:14 For starters, there are no "vectors" on the microprocessor. 15:48:22 When the CPU is reset, the instruction pointer is cleared to zero. 15:48:23 Period. 15:48:25 End of discussion. 15:48:40 Nice thing about location 0 -- it's the same spot, regardless of how big the address bus actually is. :) 15:49:00 and the interruption vectors? 15:49:04 Interrupts are checked for every time a JMP, CALL, JZ, JC, or RET instruction is executed. 15:49:17 The entry point for the NMI is hard-wired to $00000010. 15:49:23 For IRQ, it's $00000020. 15:50:15 Note that JMP is implicitly executed once all the instructions in an instruction word are done executing; by design, the JMP instruction's opcode is the same bit sequence as the empty instruction register. :) 15:51:00 mmhmm 15:51:01 The operand for all program flow opcodes are inline in the instruction register. It's value is XORed with the program counter to derive the new program counter value. 15:51:21 This has several advantages: 15:51:39 1. The branch instruction can appear in ANY slot, not just slot 0 or, as in the P21, slots 0 or 2. 15:52:09 2. When the instruction register is emptied, the default opcode is JMP, with an operand of zero. Zero XORed with PC is still the PC, which is used to fetch the next instruction. 15:52:20 So it eliminates the dedicated instruction fetch sequencing logic I'd normally have to have. 15:52:39 Pretty slick, eh? :D 15:53:13 hmm...I will have to see exactly how that is set up in conjunction with instruction sequence to see how that works 15:53:34 * TheBlueWizard isn't clear on that 15:54:11 Well, when the instruction register is fully loaded, none of the bits will have an opcode that is all zeros. 15:54:17 So none of the instructions are JUMP instructions. 15:54:36 As they are executed, the instruction register is shifted to the right, 6 bits at a time (one opcode size worth). 15:54:45 Zero bits are used to fill the instruction register. 15:55:26 I assume these instructions aren't control codes, so that'd proceed... 15:55:37 What do you mean by control codes?? 15:56:03 e.g. JSR, RET, JMP, JC, ... 15:56:12 control flow 15:56:18 They are. 15:56:23 I am really confused now. 15:56:54 I chose JMP's opcode so that a completely empty instruction register is 100% the same as saying "JMP *+4" in assembly language. 15:57:07 Well, *+1 sorry. 15:57:26 If you were to assemble JMP *+1 in this CPU's assembly language, you would get $00000000 as the generated instruction word. 15:57:37 ok....let's simplify it a bit...case one: all 5 instructions in the 32-bit "byte" are not control codes, so I understand it will eventually become zero after all these instructions get executed 15:57:49 Correct. 15:59:16 and I see re: the implicit assumption that PC get incremented after the instruction fetch...clear, no problem...and I can see how XORing will result in going to the next instruction...but I am not clear on how the control code works with this XOR scheme 16:00:18 If bits 0-5 are the jump opcode ($00), then bits 6 through 31 comprise the mask to XOR bits 0..25 of the PC with. 16:00:45 --- join: slava (~slava@69.196.155.184) joined #forth 16:00:46 hi 16:02:07 Upon executing a JMP instruction, the CPU will fetch the next instruction at (PC XOR operand), while storing (PC+1 XOR operand) back into PC. 16:02:35 I guess I'm still somewhat confused about what is confusing you. 16:02:36 :) 16:02:50 because when you get it, it clicks and it makes perfect sense. 16:02:57 It's just explaining it that is the hard part. :) 16:03:55 hmmm... 16:03:56 * TheBlueWizard is now watching Harry Potter flick 16:03:58 * kc5tja considers ordering pizza. 16:08:41 Well, anyway, I guess the first step will be to write an emulator for the CPU. :-) 16:09:32 Key-presses will trigger a maskable interrupt. It'll run under GForth on a console. 16:14:52 i think he's missing the segmentation factor 16:15:55 kc5tja> i just thought of something else... it'll be slightly more complex, but you can win 4 instructions with it. interpreter the jump,jz,jc,call opcode as such, if they are slot1, but if they are not as a different instruction. 16:16:13 i am not quite sure if this is possible, or feasable hardware wise, but it sounds good in theory 16:16:46 It's possible, but it does add circuit complications. 16:17:03 I'm writing a software simulator for my processor design now. 16:17:09 oh, or... 16:17:13 get rid of nop 16:17:26 and execute a nop, whenever you encoutner the jumps !slot1 16:17:29 slot0... 16:17:44 * futhin pops in 16:17:45 nops are kind of useless at slot0 anyhow, arent they? 16:17:46 peek aboo! 16:17:54 * futhin goes idle again 16:18:07 heheh :) 16:18:09 idling is fun ;) 16:18:14 :) 16:18:30 qFox: NOPs are usually used for timing control applications, when precise processor timing is required. 16:18:39 oh. damn. 16:18:40 :) 16:19:11 Especially if I use a ripple-carry adder, or if I use passive shifters for the multi-bit barrel shifters, I would certainly need them to make sure everything ran with the proper timing. 16:19:29 well... then i'm going back to either !slot0 nops, or short/near relative jumps 16:19:51 i mean, if you want to be able to predict cpu behaviour 16:19:57 otherwise just let it be :) 16:20:13 Well, the nice thing about my system is that it's fully predictable. 16:20:22 futhin: Heheh :D 16:20:39 futhin: I might be getting another job. One that actually pays something worth getting. 16:20:44 cool 16:20:51 $10/hr for entry-level Linux technical support at a local ISP. 16:20:51 i've gotten a job now 16:20:54 cool 16:21:24 And as if you couldn't tell already, I'm currently working on furthering the ForthBox Kestrel design. 16:21:29 (which has changed yet again.) 16:21:33 i'm helping with construction for this person thats starting up a restaurant and chances are i'll also stay and do kitchen work too 16:21:37 it'll be interesting :) 16:21:53 Cool. :) 16:21:59 something different to do 16:22:09 learn how to cook for a change ;) 16:22:42 whats the biggest change with Kestrel? 16:22:52 The microprocessor -- it's going MISC. 16:23:33 hmm what was it before? 16:23:41 and why did you change? and how does it affect the price? :P 16:24:02 Heh, read the logs -- I explained it three times already today. :D 16:24:08 heh 16:24:12 It was the 65816 before, remember? 16:24:14 ok i'll read the logs :) 16:24:16 yeah 16:24:29 what classification is 65816? if its not MISC what is it 16:24:46 CISC -- although it has few instructions, it has a ton of addressing modes (and not very orthogonal either). 16:25:54 ah 16:29:06 Hahah, this is too funny. I didn't see it until now. 16:29:25 I have a variable called `step' which counts the number of clock cycles elapsed since the CPU was "reset." 16:29:32 Well, in the reset code, I have "step off". :) 16:29:49 I was thinking of making a follow-up word called "bitch", so I can have the fully legal code, "step off bitch". :D 16:30:12 hehe 16:40:10 --- join: I440r (~mark4@adsl-64-219-100-33.dsl.lgvwtx.swbell.net) joined #forth 16:41:03 hiya I440r!!!! :) 16:41:11 hi 16:41:24 Well, I got NOP and JMP implemented. They work. :D 16:41:33 (in software, obviously) 16:41:39 kc5 so you can jump to a nop ? 16:41:50 Or to another jmp! :) 16:41:54 lol 16:42:05 well your most of the way there then :) 16:42:24 I440r: Yeah, I'm writing the software simulator for the MISC core that'll go in the Kestrel. 16:42:59 cool 16:43:34 --- join: blockhead (default@dialin-645-tnt.nyc.bestweb.net) joined #forth 16:50:31 hiya blockhead 16:53:20 I440r: just realized why you told me to export TERM=Eterm last night haha, made things a lot less confusing with isforth :) 16:54:03 it was being VERY weird, like was set default to base 5 hah 16:54:30 I440r: any way it can be fixed to it works properly with TERM=screen? 16:55:16 no. screens terminfo file is broken 16:55:20 dont use screen 16:55:48 Or use screen, but change its TERM setting. :) 16:56:16 Yay, I can call myself and overflow the return stack beautifully!! :D 16:56:18 hmm ya that might be useful, solaris also complains about TERM=screen 16:57:09 screen should NOT have its own terminfo file 16:57:14 at all 16:57:31 set TERM= to your real terminal name 16:57:38 and isforth will work perfectly ever time 16:57:39 or better yet 16:57:44 emerge -C screen 16:58:41 oh die 16:58:45 screen is my friend 16:59:07 no its not, it stabbs you in the back when you run isforth :P 16:59:14 ISFORTH is your friend :P 16:59:28 No, actually, ISFORTH is broken. :) 16:59:40 im sure it is 16:59:40 Nobody should *ever* have code that sets BASE to 5 when you use an incorrect TERM setting. 16:59:44 I mean, c'mon... :) 17:00:01 but this issue is not an isforth related problem i dont believe 17:00:35 how do you know the base is 5. maybe the terminal is misplacing the cursor just prior to writing a digit 5 ? 17:00:51 that sounds more probable 17:00:52 no, 3 3 + == 11 with TERM=screen 17:00:58 oh 17:01:02 you win 17:01:03 lol 17:01:04 hah 17:02:44 TheBlueWizard: a belated hello. :) 17:03:06 qFox: A technical error; JC should be JNC, as in the P24 -- it's purpose is to effortlessly implement -IF. 17:03:10 Sorry. 17:03:18 * blockhead has gotta stop minimizing irc and then forgetting about it :( 17:04:26 actually in the status bar at the top base is 10 to start out with but as soon as any input is executed base turns into 5 and also the stack doesn't seem to persist between lines '.' alone is always '32' with TERM=screen 17:05:21 kc5tja> thought so much, but i figured it would work either way (plus, like i said, i found no use for jnc yet ;) 17:11:36 oof, mystic rivir... tough movie... 17:27:19 with.... a very strange ending... gah, sux :\ 17:27:35 how not to end a movie. 17:29:58 --- quit: slava ("Leaving") 17:36:39 Heh 18:11:43 --- quit: SDO (Read error: 54 (Connection reset by peer)) 18:19:44 this math is killing me. i understand the whole deal, but why the hell are they going thru all those hoops to get such a ridiculous answer :\ 18:21:02 its like, the answer is 2^2, but they'll go (1+2-3+2-4+1+1+2)^(4+5-2+3-5-3) 18:21:19 well not quite like that, but equally complicated 18:22:08 (which sux, because i'm fine when getting the derivative, but when i have to .... clean things up, or whatever you call it, is where i go wrong sometimes) 18:22:57 qFox: derivativs? calculus! aaauuugh!!!!!!!!! 18:23:00 * blockhead runs and hides 18:23:05 yea... 18:23:08 * qFox runs and sleeps... 18:23:16 Heheh :) 18:23:58 * blockhead has traumatic calculus flashbacks 18:23:59 There is a reason for all that, but unfortunately, most math books choose examples that clearly don't require such sophistication. 18:24:12 * blockhead 's head explodes 18:26:32 kc5tja> the reason is to make things cleaner, i can understand that, but they go to such great lengths sometimes... its like, if i have to do all that during a math test forget it, because i wont even think of it 18:27:03 i mean, x^(1/2) becomes sqrt(x) ,etc i can do that 18:27:25 but here, lemme show you an example :p 18:28:09 get the derivative of: y= x* sqrt(2x+3) 18:28:21 chained rule applies here 18:29:02 Right 18:29:14 so, y=f(x)*g(x) f(x)=x g(x)=sqrt(2x+3) 18:29:43 derivative y'=f'(x)*g(x)+f(x)*g'(x) 18:30:12 Right. 18:31:06 y'=1* sqrt(2x+3) + x* (2x-3)^(-1/2) 18:32:10 ok, so thats ugly, i can understand. i'd make it: y'=sqrt(2x+3) + x/sqrt(2x-3) 18:32:10 Actually, y' = sqrt(2x+3) + 2x*(2x+3)^(-1/2) 18:32:30 where do you get that 2x from? 18:32:55 Chain rule again -- you need the chain rule to properly resolve the derivative of sqrt(2x+3). 18:33:02 i have, but that leads to 18:33:21 1/2 * (2x+3)^(-1/2) * 2 18:33:31 2*1/2 = 1, so neglected 18:33:34 whoops, you're correct. I forgot about the exponent. 18:33:50 well, the problem is that the answer booklet has your 2 as well :\ 18:34:01 um 18:34:10 no thats a different question, ignore that 18:34:11 anyways 18:34:16 y'=sqrt(2x+3) + x/sqrt(2x-3) 18:34:21 would be my final answer 18:34:24 2x+3 18:34:33 ... yar 18:34:39 y'=sqrt(2x+3) + x/sqrt(2x+3) 18:34:42 :P 18:34:47 but the answer 18:35:02 they multiply the first part with sqrt(2x+3)/sqrt(2x+3) 18:35:20 so their final answer becomes y'=sqrt(2x+3)+x/sqrt(2x+3) 18:35:21 Ahh, yes, that stupid rule about not having any radicals in the denominator of a fraction. 18:35:33 its... sucky sucky sucky and i hate it 18:35:40 should be 18:35:46 they do these kind of things more, its not just this 18:35:52 but this one just hit me again :p 18:36:02 y' = (2x+3) + x*sqrt(2x+3) 18:36:24 oh yes, and the main problem here, is that they give the derivative without any adjustments, and then the final answer 18:36:26 oh wait... 18:36:27 hold on. 18:36:27 not the steps in between 18:36:56 i actually had to run crying to #math and ask there in order to understand it the first time i found such an answer (in this subject) 18:37:09 and in the end you feel stupid because it comes down to basic math 18:37:55 oh wait a minute... 18:39:22 y'=sqrt(2x+3) + x/sqrt(2x+3) = sqrt(2x+3) * sqrt(2x+3)/sqrt(2x+3) + x/sqrt(2x+3) ,now the devisors are the same, y'=(sqrt(2x+3))^2 + x /sqrt(2x+3) 18:39:52 y'=2x+3+x/sqrt(2x+3) = 3x+3/sqrt(2x+3) 18:40:15 Yeah, but now to eliminate that stupid square root in the denom. 18:40:23 you cant? 18:40:36 well you can take power of a half, which is exactly the same 18:40:37 maybe ask it to leave nicely. :D 18:40:50 I know it has to be possible, but when I multiply by the conjugate, I get an irreducible quadratic that still requires a radical. 18:40:53 blockhead :p 18:41:05 whats a radical again? 18:41:12 * blockhead sorries. that was stupid, even for me 18:41:12 square root sign == radical 18:41:17 ah 18:41:19 blockhead: Heh. 18:41:33 well, like i said, ^(1/2) 18:41:38 no more sqrt :p 18:42:34 * TheBlueWizard peeks in, and grins re: math 18:43:00 but even though i agree that 3x+3/sqrt(2x+3) looks hellish different from sqrt(2x+3) + x/sqrt(2x-3) ,i would give the latter and move on as the rest would be more time-wasting then worth it for me 18:43:07 Bizarreness. I get a final answer of y = ( 3x+3 / 2x+3 )sqrt(2x+3) 18:43:09 plus i'm prone to making errors if i do :\ 18:43:29 well thats just plain ... wrong i think, plus you still have that sqrt ;) 18:43:45 It's algebraically the same as your answer. 18:44:02 the problem is not the presence of a radical; the problem is the radical *in the denominator*. 18:44:23 It's a stupid rule, but math teachers here *insist* on fractions that do not have a radical in the denominator. It's stupid. 18:44:28 i am too tired to even check that 18:44:32 oh well 18:44:35 i dont have a teacher 18:44:35 :p 18:44:40 its all self-study for me 18:44:57 and an exam in.... about 2.5 months 18:45:06 which is kind of very very important :) 18:45:16 You certainly have more discipline than I do that's for sure. :D 18:45:24 dont be so sure about that 18:45:37 i'm slacking for over half a year 18:45:44 no work, where i could sure use the money 18:46:02 * blockhead remembers his fractions. now we're into algebra. Better at that. :D 18:46:05 i'm one lazy bumm... this math thing is about the only thing :) 18:46:26 i hate conversions. i get confused very easy, and those rules... they hurt me 18:47:01 sqrt(4*2) = 2*sqrt(2) , or was it not allowed in this case. 18:47:09 if I understand, the thing that is a problme is the "x/sqrt(2x-3)" part? 18:47:11 i really dont know, and i have that all the time 18:47:37 qFox: That's normal fro someone who has never been exposed to this stuff before. 18:47:51 qFox: And yes, I do things lik sqrt(4*2)==2*sqrt(2) all the time. 18:47:54 blockhead> kc5tja's prob is that there is a root in the denominator, mine is this whole "make it smaller" :p 18:48:12 --- join: ianp (ian@inpuj.net) joined #forth 18:48:18 qFox: Well, frankly, I would just leave the way you said you would anyway. 18:48:22 kc5tja> well, i had an 8 for an exam that covered that stuff, in januari this year... i should know. 18:48:32 good evening 18:48:43 ok: I only ask becasue there is a simple fractions trick to get something unwanted out of the denominator 18:48:51 and its not exactly the first time either. i get confused and unsure of myself in general, not just in this case. 18:49:17 blockhead> get the whole fraction up? 18:49:35 blockhead: Multiply either by the denominator itself, or by its conjugate, depending on circumstances. 18:49:37 x/y = x* y^(-1) ? :) 18:50:15 kc5tja> but thats the other problem. since i have no teacher, and there will be a teacher checking the answers, i have to give at least an answer that pleases them 18:50:28 and since i only really have this book as a guideline 18:51:00 kc5tja: I think you're saying what I'm thinking there :D 18:51:05 the answer booklet cost me more then the book itself. i got the book from secondhand, but the answerbooklet i had to buy new. 18:51:41 expensive shit too :( 18:52:17 yep. :( 18:52:47 qFox: might I suggest this site?: http://mathworld.wolfram.com/ Not as complete as a textbook but has some nice nuggets of info in there 18:53:15 I usually go there for geometry but they seem to cover all math 18:56:14 blockhead> the main problem is, that i'm dutch. and dutch and english math terms do mostly not look like eachother 18:56:46 oh!!!!! 18:56:53 IF i have a problem i cant solve on my own, i go on irc, #math on efnet, and i ask there. there's usually someone there who can tell me the correct terms and explain the problem 18:56:59 like that UK vs US comma thing. 18:57:03 yep 18:57:05 * blockhead shudders 18:57:12 100.000.000,01 18:57:16 dutch notation 18:57:30 but thats not so much a problem since i'll recognise either notation :) 18:57:36 (and, who wouldnt...) 18:57:42 Actually, it turns out that both the point AND the comma are interchangable, as both are used in the original Arabic texts when numbers were first being explained. 18:57:46 looks like UK .... backwards and wrong :D 18:58:02 Our comma is literally the Arabic character for "and". 18:58:08 yes, it shouldnt take much to recognize the notation :) 18:58:23 qFox: there is #math channel on freenode.net too...plus you can use mathbot there 18:58:29 it can wird one out to switch between them 18:58:31 weird, not wird 18:58:32 heh well i'm on efnet anyways 18:58:37 i idle on #math on efnet 18:59:06 and my aibot (random chatterbot) already roams in #math on freenode so i dont want any "clone" problems ":) 18:59:13 mathworld.wolfram.com <-- cool 19:00:04 ah you know, this whole math thing, its not hard for me. i might bitch and moan, but all in all, i catch up pretty quickly. its just alot of stuff to cover, in 3 months 19:00:34 plus, remembering it, without getting confused under pressure, which is... well simply _the_ challange for me. 19:01:03 well, i'm off now 19:01:05 nite all 19:01:06 qFox: understood 19:01:12 qFox: Good luck. 19:01:19 Hope you pass the test. 19:01:23 tnx :) 19:01:35 --- quit: qFox ("this is mirc's last attempt of communication...") 19:03:23 Damn airfoils!! 19:03:39 The wind keeps pushing my window blinds off the window sill. :) 19:04:01 All that energy going to waste too. I could be doing something useful with it, like, I dunno, powering a little LED lamp or something. :D 19:04:45 the LED lamp concept is intereting. I wonder if they generate less heat than a regular lightbulb 19:05:01 Substantially. 19:05:20 A regular bulb is only 5% efficient or so; an LED can be as much as 20% to 35% efficient. 19:06:30 nice. LEDs don't blwo out either. :) do they? :o 19:06:54 They do, but we're talking decades of lifespan, not hours. :) 19:07:10 * blockhead pictures cool blue leds all over his house. :D 19:07:26 As long as you don't overdrive the LED, and keep them out of direct sunlight, they ought to last a good 40 to 50 years at least. 19:08:05 nice 19:09:43 Yep. 19:09:59 --- quit: I440r (Read error: 54 (Connection reset by peer)) 19:10:13 Another thing I want to experiment with is weight-driven power sources. Like the old Grandfather clocks, where you had to raise a weight to power the clock. 19:12:56 gotta go...bye all 19:13:04 see ya, TheBlueWizard 19:13:29 bye and good luck with your new MISC design :) 19:13:30 'nn TheBlueWizard 19:13:45 Thanks. So far the software simulator is coming along nicely. 19:13:51 I'll post code for it when I'm finished. 19:13:57 :) 19:14:05 er...ok :) 19:14:09 --- part: TheBlueWizard left #forth 19:14:10 kc5tja: is that a new project for you? 19:14:30 * blockhead deosn't recall kc5tja mentioning it here before 19:14:54 The Kestrel's main CPU is changing from the 65816 to a MISC processor design of my own making. 19:15:09 qFox helped me work out some of the kinks in the instruction set. 19:15:22 ! 19:15:25 Making this change does a couple of things. 19:15:46 so the kestral project is still on? 19:16:04 First, it simplifies the hardware in two respects: since the CPU is being engineered to the proper bus interface to begin with, there is no need for the FTS1002 K-Bus bridge. The CPU will talk K-Bus right out of the box. 19:16:21 Second, it eliminates all the really *wonky* address decoding shinanigans that I had to go through with the 65816. 19:16:25 Yes, the Kestrel is still on. 19:16:45 :D 19:17:07 The other advantage of the MISC engine is this: speed. Speed. And then there is speed. Oh, and did I mention speed? 19:17:21 The CPU will be clocked at 25.175MHz. Not 12.58MHz like the 65816 was. 19:17:49 so like one machine code instruction for each forth word? 19:18:05 The MISC engine executes one instruction per cycle. Therefore, and accounting for the cycles used to fetch instructions with, total peak performance will be in the 20 to 25MIPS range. 19:18:15 (primary word, that is) 19:18:20 Yes 19:18:36 Also, the MISC processor is a true 32-bit machine. 19:18:48 And I do emphasize the phrase, "True 32-bit." 19:18:55 oooh! better addressing! 19:18:56 The smallest addressible chunk of memory is 32-bits wide. :) 19:19:23 And there are 4.2 billion 32-bit "bytes" in its address space. 19:19:40 so that is 4x more RAM than a regular "32-bit" system can address! Nice 19:20:08 Yes, but one has to be careful with respect to data packing, because it's all-too-easy to consume memory at 4x the normal rate too. 19:20:41 Therefore, manipulation of 8-bit text requires packing and unpacking into buffers and the like. 19:21:01 OTOH, working with Unicode is every bit as easy as working with ASCII on this kind of machine. 19:21:06 no biggie. the aplication software can take care of that for its data 19:21:07 And it has zero operating overhead. 19:21:11 Yep. 19:21:21 the old decsystem did that. had a 21 bit word (or was it 27?) 19:21:22 Packing and unpacking is usually done at I/O times anyway. 19:21:34 not that is not a new problem 19:21:46 meant to say "that is not a new problem" 19:22:04 Well, the DEC Alpha processor, so I'm told, has a 64-bit address space, where each address is a 64-bit word. *THAT* is a huge address space. :D 19:22:41 so if I were writing a word processor id'e have to pack/unpack 4 bytes into each address 19:22:57 If you were going to deal with 8-bit text encoding, yes. 19:23:04 the kestral64 can have a 64-bit word mode :D 19:23:22 More likely, what'll happen is that you'd have the document itself as 8-bit encoded text, and maybe a 4K buffer of pre-unpacked text that gets manipulated in real-time. 19:23:45 Screw that -- the K64 will have a real, honest to goodness 64-bit CPU. 19:23:49 No "modes" about it. :) 19:24:10 I said "mode" so that it can run older kestral software :D 19:24:31 Hmm, I'd try to find a way to do that in software, personally. 19:24:50 E.g., old assembly code uses a special assembler that assembles 32-bit assembly into 64-bit opcodes, etc. 19:24:58 * blockhead nods. might be a better idea, by that time 19:25:05 JIT 19:25:14 Forth has always been about JIT. 19:25:28 In fact, Forth is best utilized, I find, when you treat the Forth VM as a virtual processor of sorts. 19:25:34 yes. 19:25:54 Dictionary space serves as combined code and data cache. 19:26:03 once my forth's bare bones outer interpreter is written, everything written afterwords will be source files 19:26:09 block storage is very much like data and code cache lines, etc. 19:26:12 yes, writing forth reminds me of writing emulators 19:27:24 Well, my simulator isn't going to be 100% accurate. Not at first, at least. 19:27:38 I made a tactical error: some things are 32-bits wide, others are 33-bits wide. Oops. :( 19:27:43 That'll be corrected in a later version. 19:35:27 Actually, I'll just strip the whole 33rd bit for now, and leave it as a pure 32-bit machine. 19:35:36 No extra carry bit on anything for the time being. 19:37:47 not even a carry/overflow register? 19:38:00 Nope. 19:38:17 In the end, like the P21, this CPU will have an extra bit on each stack item. 19:38:42 So the data stack will be 33-bits wide, not 32-bits 19:39:05 BUT, for the sake of software emulation, and ease of coding, I'm just going to make everything a flat 32 bits, and treat bit 31 as the carry bit. 19:39:14 how's that gonna pack in 32bit memory? 19:39:18 So if you wanted to, you could think of the software emulator as being a 31-bit machine. :) 19:39:23 It doesn't. 19:39:31 When you load a value from memory, bit 32 is cleared. 19:39:43 ohhhhhhh 19:39:46 ok 19:39:48 If you need to sign-extend it, you do a 2* 2/ phrase to set the high bit accordingly. 19:40:46 The possibility of adding a sign-extend instruction exists; however, I don't think I'll be needing it anytime too soon. 19:40:55 So for now, I'm leaving it out. 19:43:29 well, good luck with it. 19:43:43 I gotta get to sleep. 'night 19:43:49 --- quit: blockhead ("laugha while you can, monkey boy") 22:05:59 --- join: I440r (~mark4@adsl-64-219-100-33.dsl.lgvwtx.swbell.net) joined #forth 22:14:41 --- quit: ianp (Remote closed the connection) 22:30:16 I440r: The assembler for my MISC CPU is nearing completion. 22:30:23 Damn, I love the sheer simplicity of a Forth processor. 22:48:33 http://www.rotten.com/library/hoaxes/temp-agencies/girls.jpg 22:48:42 sorry, damn side mouse button again 22:48:53 You should turn that thing off then. :D 22:49:07 i have no idea how :) 22:49:10 You're liable to reveal inner-most secrets with it that you'd probably not want revealed. :) 22:49:41 i don't have any inner-most secrets that i don't want revealed :) 22:50:20 Dear digiDiary: man I am such a liar 22:50:23 whoops :) 22:50:35 --- quit: Sonarman ("leaving") 22:50:37 Hehe 22:50:39 doh, he left. 22:50:59 kc5 cool! 23:03:49 Interestingly enough, though, the assembler works better than the simulator. :( 23:14:21 Anyway, I've got another job interview tomorrow, so adios, muchachos... 23:14:28 --- quit: kc5tja ("THX QSO ES 73 DE KC5TJA/6 CL ES QRT AR SK") 23:59:59 --- log: ended forth/04.05.09