On 2008-01-09, Timothy Normand Miller wrote: > On 1/6/08, Petter Urkedal <[EMAIL PROTECTED]> wrote: > > I'll make room for the new instruction by using the same ALU operand > > code for all three shift operations, move y-reg bits to the lower end > > of y-immediates, and use the second and third highest immediate bit to > > select the mode of the shifter: > > > > 16 | 15 14,13 4 0 > > mode | op | imm? | z-reg | x-reg |sign shift-mode y-reg > > |<--------- y-imm ----------> > > Looks good. I'm still trying to work out how it works from the code.
The claim that we save an instruction for multiply is a mistake on my part. What I didn't consider is that the code depends on shifting out the bits and testing when the operand becomes zero to determine the stop condition. That does not work with rot. I still think the modified version is better though, since it leaves one slot open for a 16-bit immediate instruction and allows us to add a large number of short immediate instructions if we wish by widening the "shift-mode" (I call it QOPX in the new code, suggesting "extended" operators). Here is a preview until I commit: http://git.eideticdew.org/?p=ogp-pu.git;a=commit;h=09a4346e8be7854bcb8da5add18332bd46f9fd2f > Some comments that enumerate the various modes would help. You mean in the RTL? I think it's all there in "`define"s, but maybe you're thinking of more like a table. I could add more low-level info into oga1hq-manual.tex when things are stable, enough that someone could write an alternate assembler if they wish. But, if written in C, it's easiest to just use oga1hq.h and oga1hq.c (the code generator "mini-library"). > > I consider using the attached rot/shift module. I'm not sure if this is > > a good idea, but I force the synthesizer to make it O(log(N)) depth. > > The three operations are combined to allow sharing the most expensive > > part. Should I add the full license text and put it in rtl/lib? > > Otherwise, I'll insert it in oga1hq.v. > > It's very short and very HQ-specific. I'd just put it into oga1hq.v. Okay. _______________________________________________ Open-graphics mailing list [email protected] http://lists.duskglow.com/mailman/listinfo/open-graphics List service provided by Duskglow Consulting, LLC (www.duskglow.com)
